Skip to content

Persist completed plan steps and exit execution - #3

Merged
a4180p merged 1 commit into
mainfrom
persist-execution-progress
Sep 8, 2026
Merged

a4180p merged 1 commit into
mainfrom
persist-execution-progress

Conversation

@a4180p

@a4180p a4180p commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Problem

During execution, revdiff_mark_done and [DONE:n] markers changed only the extension's in-memory checklist. The status widget moved, but the submitted plan file retained [ ] checkboxes.

Completion was checked only from agent_end. That made finishing timing-dependent, and /revdiff-plan-mode rejected every executing state even after every item had been completed.

Changes

  • Add renderChecklist, which updates only checklist markers in the submitted Markdown while preserving indentation, bullet text, and non-checklist content.
  • Persist the submitted plan after revdiff_mark_done and recognized [DONE:n] markers.
  • Add isChecklistComplete, which requires a nonempty checklist and every item completed.
  • Complete the execution immediately on the last completed item: report the existing Plan Complete! message exactly once, restore prior tools, and return to idle.
  • Allow /revdiff-plan-mode to exit a completed nonempty execution. Incomplete and checklist-free executions still require /revdiff-plan-abort.
  • Keep agent_end as a fallback for restored state / an already-complete plan.

Tests

npm run validate after rm -rf dist: 13/13 passing.

New regression coverage verifies checkbox rendering preserves surrounding Markdown and that automatic completion requires a nonempty, fully completed checklist.

Execution only updated the extension's in-memory checklist, leaving the
submitted plan's Markdown checkboxes unchecked. Persist current completion
state after revdiff_mark_done and [DONE:n] markers, preserving all other plan
text.

The final completed step now runs the existing completion notification and
idle transition immediately. This removes the execution-only tools and
restores the saved tool list instead of waiting for a later agent_end event.

Allow /revdiff-plan-mode to exit a nonempty, fully completed checklist. Keep
the explicit /revdiff-plan-abort requirement for incomplete plans and plans
without checklists, where completion cannot be inferred.
@a4180p
a4180p force-pushed the persist-execution-progress branch from a8a1023 to 432d817 Compare September 8, 2026 16:11
@a4180p
a4180p merged commit 8de4f55 into main Sep 8, 2026
1 check passed
@a4180p
a4180p deleted the persist-execution-progress branch September 8, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant