Skip to content

fix(run): replay plan-file edits when capturing the presented plan - #328

Merged
slowdini merged 1 commit into
devfrom
fix/plan-capture-edit-replay
Oct 7, 2026
Merged

slowdini merged 1 commit into
devfrom
fix/plan-capture-edit-replay

Conversation

@slowdini

@slowdini slowdini commented Oct 7, 2026

Copy link
Copy Markdown
Owner

The plan-file signal took the last write under the plan root and read its content_field. Claude Code agents often revise the plan in place with Edit or MultiEdit, which carry no content, so capture silently fell back to the round's final message while still recording signal: plan_file. A plan-review pass produces exactly that trailing edit, which biased captured artifacts against the arm that reviewed.

Rebuild the last-touched plan file by replaying every write to that path in order: a write carrying content_field replaces the content, and an edit applies with the harness's matching rules (one occurrence unless replace_all). An edit the tool rejected (<tool_use_error>) changed nothing and is skipped. When the replay cannot reproduce the file, the final message stands in and plan.signal records final_message.

The plan-file signal took the last write under the plan root and read its
`content_field`. Claude Code agents often revise the plan in place with
`Edit` or `MultiEdit`, which carry no `content`, so capture silently fell
back to the round's final message while still recording
`signal: plan_file`. A plan-review pass produces exactly that trailing
edit, which biased captured artifacts against the arm that reviewed.

Rebuild the last-touched plan file by replaying every write to that path
in order: a write carrying `content_field` replaces the content, and an
edit applies with the harness's matching rules (one occurrence unless
`replace_all`). An edit the tool rejected (`<tool_use_error>`) changed
nothing and is skipped. When the replay cannot reproduce the file, the
final message stands in and `plan.signal` records `final_message`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@slowdini
slowdini merged commit bd7a1ba into dev Oct 7, 2026
7 checks passed
@slowdini
slowdini deleted the fix/plan-capture-edit-replay branch October 7, 2026 02:12
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