Repository navigation
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem
OpenCode's current TodoWrite implementation and associated agent guidance treats tasks as strictly sequential. Two concrete gaps exist in the todo system compared to what claw-code implements:
-
Multiple
in_progressitems are not supported for parallel workflows. The validator currently rejects or warns on multiplein_progresstodos, preventing orchestrators from expressing that several tasks are legitimately running in parallel. -
No
verificationNudgeNeededsignal. When all todos complete without any task containing "verif" in its content, it's a strong signal that the agent may have skipped verification. claw-code'sTodoWritereturnsverificationNudgeNeeded: truein this case, allowing the runtime to inject a reminder prompting the agent to verify its work before calling the task complete.
Proposed changes
1. Allow multiple in_progress todos
// Current (overly restrictive)
if (todos.filter(t => t.status === "in_progress").length > 1) {
throw new Error("Only one task can be in progress at a time")
}
// Proposed: remove the restriction with an explanatory comment
// Multiple in_progress items are valid for parallel agent workflows2. Add verificationNudgeNeeded to the tool response
const allDone = todos.every(t => t.status === "completed")
const hasVerificationTask = todos.some(t =>
t.content.toLowerCase().includes("verif")
)
return {
oldTodos,
newTodos: todos,
verificationNudgeNeeded: (allDone && todos.length >= 3 && !hasVerificationTask) || undefined
}3. Surface the nudge in the system prompt injection
When verificationNudgeNeeded: true, the runtime should append a reminder to the agent's next turn:
"All tasks are marked complete. Before finishing, please verify your work by running tests or reviewing the output."
Why this matters
- Multi-agent parallel execution patterns require multiple simultaneous
in_progressstates — this is the correct model for fork-join orchestration - Verification skipping is one of the most common failure modes in autonomous coding agents; a built-in nudge addresses it systematically without requiring custom prompting
- Small change, measurable quality improvement on complex multi-task completions
Acceptance criteria
-
TodoWriteaccepts any number ofin_progressitems without error or warning -
TodoWriteresponse includesverificationNudgeNeeded: truewhen: all items complete, count >= 3, and no item contains "verif" - When
verificationNudgeNeededis set, a system reminder is injected into the next agent turn - Existing single-task sequential behavior is unaffected
- Agent prompt/system instructions updated to explicitly note that parallel
in_progressis valid
Related / cross-reference
- claw-code reference: https://github.com/instructkr/claw-code/tree/main/rust (
execute_todo_write,validate_todos) - Sub-agent tool isolation: [FEATURE]: Sub-agent tool-set isolation by role (Explore / Plan / Verification scopes) #20483
- Background task result batching: [FEATURE]: Silent result collection for background tasks to avoid consuming LLM turns #20460
- Learnings from claude-code source: Lessons from claude-code-main? #20475
Activity
rekram1-node commentedon Apr 1, 2026
closing due to issue spam