Skip to content

fix(control): preserve approved plan execution across pauses#3935

Open
AresNing wants to merge 1 commit into
esengine:main-v2from
AresNing:codex/fix-plan-mode-pause-resume
Open

fix(control): preserve approved plan execution across pauses#3935
AresNing wants to merge 1 commit into
esengine:main-v2from
AresNing:codex/fix-plan-mode-pause-resume

Conversation

@AresNing

Copy link
Copy Markdown

Fixes #3760

Summary

  • Preserve approved plan execution state across user-directed pauses.
  • Require an explicit continuation turn before carrying approved-plan auto-approval across turns.
  • Keep prose/no-list approved plans resumable even when initial todo seeding is unavailable.

Root Cause

Plan approval previously set auto-approval only for the immediate execution turn after exit_plan_mode. If the model paused for user review, that turn ended and auto-approval was reset. The next continue turn no longer had structured approved-plan state, so writer tools went through the normal approval gate and the task list could stop updating.

Fix

  • Add controller-scoped approved-plan execution state.
  • Split session-level approved-plan activity from per-turn continuation authorization.
  • Inject an approved-plan continuation marker only for explicit continuation commands.
  • Auto-allow ordinary writer tools only during the immediate approved turn or an explicit continuation turn.
  • Support approved prose plans without seeded markdown todos.
  • Clear approved-plan scope on completed todo_write, non-continuation input, or session/plan context changes.

Validation

  • gofmt -l .
  • go test ./...

Note

The desktop top-level package requires frontend/dist before go test .; without built frontend assets it fails at embed setup. This is unrelated to the controller fix.

@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development agent Core agent loop (internal/agent, internal/control) labels Jun 11, 2026
@AresNing AresNing force-pushed the codex/fix-plan-mode-pause-resume branch 4 times, most recently from 08f7776 to c464587 Compare June 12, 2026 08:18
@AresNing AresNing force-pushed the codex/fix-plan-mode-pause-resume branch from c464587 to c544f8d Compare June 12, 2026 08:29
@AresNing AresNing marked this pull request as ready for review June 12, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Plan Mode 中带有指令的计划,继续执行时状态丢失:模式变为 auto + 进度表不再更新

1 participant