Skip to content

fix(agent): allow pending todo signoff#3673

Merged
esengine merged 1 commit into
esengine:main-v2from
paradoxSCH:fix-3664-todo-step-signoff
Jun 9, 2026
Merged

fix(agent): allow pending todo signoff#3673
esengine merged 1 commit into
esengine:main-v2from
paradoxSCH:fix-3664-todo-step-signoff

Conversation

@paradoxSCH

Copy link
Copy Markdown
Contributor

Summary

Root cause

todo_write rejects newly completed items unless they already have a successful complete_step receipt. When a model batches multiple completions, that todo_write can fail and therefore never becomes the latest successful todo baseline. Follow-up complete_step calls then validate against the older baseline, where later steps may still be pending, so those sign-offs fail too. The model can get stuck retrying sign-offs and final verification while final readiness still sees incomplete todos.

Fix

complete_step now accepts a matched todo in pending, in_progress, or completed state. The evidence checks still run, and todo_write still requires successful complete_step receipts before accepting completed transitions. This breaks the stale-baseline lock without removing the evidence-backed completion guard.

Fixes #3664.
Related to #3633; this addresses the agent-side stale todo baseline that can make progress appear stuck, but it does not include a separate TUI display policy change for failed todo_write intents.

Verification

  • PASS: go test ./internal/agent -run TestEvidenceFlowRecoversAfterBatchTodoCompletionRejection -count=1
  • PASS: go test ./internal/tool/builtin -run 'TestCompleteStep|TestTodoWrite' -count=1
  • PASS: go test ./internal/agent ./internal/tool/builtin ./internal/evidence -count=1
  • PASS: git diff --check
  • NOTE: go test ./internal/... -count=1 still has unrelated existing/environment failures on this Windows machine:
    • internal/cli: TestModelSwitchRefreshesCustomStatusline
    • internal/installsource: TestApplyLocalSkillLinkMode fails because symlink creation requires a privilege not held by the client

Notes

Local commit used --no-verify because the repository hook invokes npm from C:\deepseek, where there is no root package.json on main-v2. The Go checks above were run manually.

@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development skills Skill system (internal/skill, internal/tool) agent Core agent loop (internal/agent, internal/control) and removed v2 Go rewrite (1.x) — main-v2 branch, active development labels Jun 9, 2026
@paradoxSCH paradoxSCH marked this pull request as ready for review June 9, 2026 10:54
@esengine esengine merged commit 512a182 into esengine:main-v2 Jun 9, 2026
10 checks passed
SuMuxi66 pushed a commit to SuMuxi66/DeepSeek-Reasonix that referenced this pull request Jun 10, 2026
dorokuma pushed a commit to dorokuma/DeepSeek-Reasonix that referenced this pull request Jun 10, 2026
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) skills Skill system (internal/skill, internal/tool)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 更新步骤失败,会触发最后一步,最终形成死循环

2 participants