You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Native infinite agent mode (auto-continue until done, with limits) #47019
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Long migrations stall because the agent stops and the user must manually send "continue". I maintain an external supervisor (dorlanpabon/opencode-infinite-agent) that keeps sending continuations until a sentinel ([TASK_COMPLETE]) or all session todos are done, bounded by max iterations / timeouts. As an external project it is tedious to integrate fully — this should be native:
Infinite mode per session, toggled in the composer next to agent/model/effort (Mode: Complete | Infinite), plus an infinite config section (maxIterations, maxHours, sentinel, todoDetection).
When active, the runner auto-continues an idle-but-unfinished drain (sentinel missing and todos open) until done or limits hit. Never auto-continue while a permission/question is pending; existing interrupt stays as the stop button.
This issue might be a duplicate of existing issues. Please check:
[FEATURE]: Auto-continue when model hits output token limit (finish_reason: "length") #17471: Auto-continue when model hits output token limit — overlaps on the "keep going" concept; that issue focuses specifically on finish_reason: length auto-continuation, while this request is broader (sentinel detection, todo tracking, per-session toggle, config limits). Worth coordinating to avoid divergent implementations.
I hit the same failure mode with GLM 5.3 in the normal build agent: the model brainstormed and hallucinated instead of executing, then returned a normal stop before the requested work was complete. I had to send continue three times; on the fourth prompt I explicitly told it to stop brainstorming, update the todos quickly, and execute the work.
This suggests two useful acceptance criteria beyond an opt-in infinite mode:
The default build flow should make execution-first behavior explicit: do not restart planning or brainstorming when actionable todos remain; inspect the current todos and execute the next unfinished item.
A normal provider stop should not be treated as task completion when the session has unfinished todos, unless the user explicitly asked for a response-only turn.
Automatic continuation still needs strict bounds and must stop for pending permissions/questions, provider errors, interruptions, or repeated no-progress turns. The current behavior makes users manually type continue even when the session state already shows unfinished work.
Thanks, and for sharing your supervisor. This overlaps with #27167 (native session goals), which covers continuing automatically while a goal isn't finished, with limits and budgets. We'd rather track it in one place, so we're closing this as a duplicate. Please add your design points there (sentinel and todo-based completion, max iterations/hours, never continuing while a permission or question is pending), along with @AbhijitK20's point about unfinished todos. Until then, your supervisor can run as a plugin, since V2 plugins can subscribe to session events and send follow-up prompts: https://opencode.ai/v2/docs/build/plugins.
Activity
github-actions commentedon Sep 3, 2026
This issue might be a duplicate of existing issues. Please check:
finish_reason: lengthauto-continuation, while this request is broader (sentinel detection, todo tracking, per-session toggle, config limits). Worth coordinating to avoid divergent implementations.AbhijitK20 commentedon Sep 8, 2026
I hit the same failure mode with GLM 5.3 in the normal build agent: the model brainstormed and hallucinated instead of executing, then returned a normal stop before the requested work was complete. I had to send
continuethree times; on the fourth prompt I explicitly told it to stop brainstorming, update the todos quickly, and execute the work.This suggests two useful acceptance criteria beyond an opt-in infinite mode:
stopshould not be treated as task completion when the session has unfinished todos, unless the user explicitly asked for a response-only turn.Automatic continuation still needs strict bounds and must stop for pending permissions/questions, provider errors, interruptions, or repeated no-progress turns. The current behavior makes users manually type
continueeven when the session state already shows unfinished work.neriousy commentedon Oct 21, 2026
Thanks, and for sharing your supervisor. This overlaps with #27167 (native session goals), which covers continuing automatically while a goal isn't finished, with limits and budgets. We'd rather track it in one place, so we're closing this as a duplicate. Please add your design points there (sentinel and todo-based completion, max iterations/hours, never continuing while a permission or question is pending), along with @AbhijitK20's point about unfinished todos. Until then, your supervisor can run as a plugin, since V2 plugins can subscribe to session events and send follow-up prompts: https://opencode.ai/v2/docs/build/plugins.