Activity log and undo
Every change made through a VX ability, whether by an AI assistant, WP-CLI or another integration, is added to an activity log: what changed, who ran it, how it arrived (MCP, command line, REST or dashboard), the task it belonged to, and how to reverse it.
Reviewing changes
Ask your assistant to list recent changes, or use the vx-review-changes prompt. From the command line:
bash
wp vx-framework abilities run vx-framework/list-changes --user=adminEach entry says whether it can still be undone, has already been undone, or has been changed again since. Changes that ran as one task are grouped.
Note
The AI screen doesn't currently include a view of the activity log. Review and undo changes through your assistant or WP-CLI.
Undoing
A change can be undone on its own, or a whole task at once, newest change first. Undo is safe by default:
- It checks first whether anything changed the object since. If it did, undoing would also throw that later work away, so undo stops and says so. It can be forced once you've checked.
- It can be tried as a dry run, which reports whether it would work without changing anything.
- Undoing a whole task reverses every change it can and lists the ones it couldn't, with the reason for each. It reports success only when every change in the task is undone. If even one change was left in place, it says so.
- Undo works one way. There's no redo; to put a change back, restore it from the fieldset's revisions or ask the assistant to make it again.
Changes that cannot be undone
Most changes can be reversed. These can't:
- Permanently deleting a post (skipping the trash).
- Deleting a term. WordPress has no trash for terms, so the term, its field values and its assignments to posts are gone.
- Deleting a media file. The file and all its image sizes are removed from the server.
- Writing configuration to a project file, or deleting a project file. Recover those from version control.
- Moving or deleting stored field values in Meta Watch.
- Replacing more than 1 MB of earlier content, whether field values or a post body, term description or comment that long. The change is saved, but the log doesn't keep values that large, so it is recorded as not reversible. The change itself reports that it can't be undone.
How long a change stays reversible also depends on history: configuration undo relies on revisions, and only the 15 most recent revisions per object are kept. An older entry stays in the log, marked as no longer reversible.
What the log keeps
The log keeps the newest 1,000 entries. To undo content changes, each entry stores what was there before: the earlier field values, including values of sensitive fields, and the earlier title, text and other properties of a post, term or comment.
Small earlier values, up to 20 KB, are shown with the entry. Anyone who can read the log (including an assistant with the default read-only access) can see them. Larger ones, such as a long Repeater or a long post body, are kept with the entry but not shown: listing changes says they are there, and undoing the change reads them back and writes them. They are removed with their entry when the log is trimmed.
Technical details for LLMs
- Journal:
{prefix}vxframework_ability_activity; fields per row: ability, author (name recorded with the row;Systemfor CLI/cron), origin (mcp|cli|rest|dashboard),batch_id, summary + detail bullets,undodescriptor,undo_payload(nullable; set only when arestore_valuesinput is too large to keep inline). Writes that partially persisted (ok: false,persisted: true) are journaled too. vx-framework/list-changes: cursor paging (before_id= previousnext_cursorwhilehas_more), filtersbatch_id,origin. Entry state:undo_available,unavailable_reason(undone|reversal|expired|none),undone { at, by, by_name },reverts_id,superseded. Never returnsundo_payload.- Write responses: every journaled write returns
undo(descriptor),undo_available(bool, same verdictlist-changesgives the entry) andactivity_id(the entry'sid; absent when nothing was journaled).update-post,update-termandupdate-commentalso returnprevious, the properties as they were, leaving out any whose JSON is over 20,000 bytes. restore_valuessizes (JSON ofundo.input:{ id, values }for a values write,{ id, <previous properties> }forupdate-post,update-term,update-commentandupdate-media): up to 20,000 bytes, inline, replayable as is. Over that, the input's largest value (values, or a property such ascontent,excerptordescription) is kept inundo_payload, byte for byte as measured, when it is within the payload budget (default 1,000,000, filtervxframework/abilities/activity/max_payload_bytes, clamped to 20,000–2,000,000) and the rest of the input fits in 20,000 bytes.undois then{ strategy: "restore_values", ability: "vx-framework/undo-change", input: { id: <entry id> }, stored: "<that key>", target, guard_hash, note }, and the undo puts the value back under that key. Otherwiseundo.strategyisnoneand the note says the values were too large to record. A stored entry whose payload is missing reportsundo_available: false,unavailable_reason: "expired".vx-framework/undo-change:id(fromlist-changesor a write'sactivity_id) orundo_batch_id;dry_run;forceoverrides the drift check (comparesguard_hash). Over MCP the reversal may only run abilities that connection can already call. Reversal rows carryreverts_idand can't themselves be undone; no redo.- Batch unwind result:
okis true only when every entry ends undone (by this run or earlier). Otherwiseok: falsewithcodechanged_since(re-run withforce),undo_failed, ornot_reversible, and the reversible entries are still undone. Counts:undone,skipped,already_undone,failed,conflicts; per-entryresults[]withcode/message. The dry run'swarningsgive how many entries would be left in place. - Undo strategies:
restore_revision(vx-framework/restore-revision),delete(matching delete ability),reset_to_code(vx-framework/reset-config),restore_values(content write with previous values),restore_post_revision(block documents),none(withnote). - Retention: 1,000 rows (
vxframework/abilities/activity/max_entries); config revisions 15 per entity, sorestore_revisionundos expire earlier. Filter what's recorded withvxframework/abilities/activity/record. - Prior values (including
is_sensitive()types) and properties up to 20,000 bytes are stored inline in undo descriptors and returned byvx-framework/list-changes; a larger one stays inundo_payload, which no read returns.