Skip to content

[FEATURE]: Native infinite agent mode (auto-continue until done, with limits) #47019

Closed as duplicate

Description

@dorlanpabon

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

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.

Related: #19384, #20874.

Activity

  1. github-actions commented on Sep 3, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. AbhijitK20 commented on Sep 8, 2026

    @AbhijitK20

    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.

  3. neriousy commented on Oct 21, 2026

    @neriousy
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions