Skip to content

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=admin

Each 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; System for CLI/cron), origin (mcp | cli | rest | dashboard), batch_id, summary + detail bullets, undo descriptor, undo_payload (nullable; set only when a restore_values input 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 = previous next_cursor while has_more), filters batch_id, origin. Entry state: undo_available, unavailable_reason (undone | reversal | expired | none), undone { at, by, by_name }, reverts_id, superseded. Never returns undo_payload.
  • Write responses: every journaled write returns undo (descriptor), undo_available (bool, same verdict list-changes gives the entry) and activity_id (the entry's id; absent when nothing was journaled). update-post, update-term and update-comment also return previous, the properties as they were, leaving out any whose JSON is over 20,000 bytes.
  • restore_values sizes (JSON of undo.input: { id, values } for a values write, { id, <previous properties> } for update-post, update-term, update-comment and update-media): up to 20,000 bytes, inline, replayable as is. Over that, the input's largest value (values, or a property such as content, excerpt or description) is kept in undo_payload, byte for byte as measured, when it is within the payload budget (default 1,000,000, filter vxframework/abilities/activity/max_payload_bytes, clamped to 20,000–2,000,000) and the rest of the input fits in 20,000 bytes. undo is 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. Otherwise undo.strategy is none and the note says the values were too large to record. A stored entry whose payload is missing reports undo_available: false, unavailable_reason: "expired".
  • vx-framework/undo-change: id (from list-changes or a write's activity_id) or undo_batch_id; dry_run; force overrides the drift check (compares guard_hash). Over MCP the reversal may only run abilities that connection can already call. Reversal rows carry reverts_id and can't themselves be undone; no redo.
  • Batch unwind result: ok is true only when every entry ends undone (by this run or earlier). Otherwise ok: false with code changed_since (re-run with force), undo_failed, or not_reversible, and the reversible entries are still undone. Counts: undone, skipped, already_undone, failed, conflicts; per-entry results[] with code/message. The dry run's warnings give 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 (with note).
  • Retention: 1,000 rows (vxframework/abilities/activity/max_entries); config revisions 15 per entity, so restore_revision undos expire earlier. Filter what's recorded with vxframework/abilities/activity/record.
  • Prior values (including is_sensitive() types) and properties up to 20,000 bytes are stored inline in undo descriptors and returned by vx-framework/list-changes; a larger one stays in undo_payload, which no read returns.

Documentation for the VX Framework.