Skip to content

[DOCS] Document the interactive subagent done signal and the tools.agent.interactive.idle_timeout auto-close #873

Closed

Description

Summary

PR inference-gateway/cli#1429 (fix for inference-gateway/cli#1422) lets tmux-interactive subagents signal task completion and auto-closes their idle panes. The CLI repo's own docs (docs/configuration-reference.md, docs/subagents.md) are already updated in-tree. This ticket tracks the docs-site-facing follow-up so user-facing documentation pages stay in sync.

What changed, user-facing:

  • The subagent chat writes done: true in the SubagentResultFile (the JSON behind INFER_SUBAGENT_RESULT_FILE) on its task turn, and on a failed terminal turn. The parent monitor closes the pane itself and emits exactly one [Subagent Completed: <label>] note (with the error on failure).
  • A subagent that never reports done (a turn that ended without any text, a hung TUI, or a pane running an older binary) is closed after tools.agent.idle_timeout seconds of inactivity: default 300 seconds, 0 disables, env override INFER_TOOLS_AGENT_IDLE_TIMEOUT. The close note is [Subagent Closed: <label>] and the early warning is [Subagent Idle: <label>]. The old fake [Subagent Completed] idle message is gone.
  • Every completed turn with text counts as done, including one that ends with a question, so task descriptions must be self-contained.
  • The tools.agent.interactive block is removed. layout and fallback no longer exist: panes always open as a vertical split and always fall back to headless outside tmux.
  • Approval prompts pause that idle clock, and SendSubagentInput typing resets it. CloseSubagent is now only for stopping a subagent early.

Acceptance Criteria

  • The configuration reference covers tools.agent.idle_timeout: default, 0 disables, the env override, and that approvals pause the clock
  • No page mentions tools.agent.interactive.layout or tools.agent.interactive.fallback
  • The subagent docs describe the done signal and the note formats ([Subagent Completed], [Subagent Idle], [Subagent Closed]) and that the main agent no longer needs CloseSubagent in the normal case
  • Any page that describes interactive subagent panes as a forever-open REPL is updated to match

Reference: inference-gateway/cli#1429

Activity

  1. added
    documentation
    on Sep 30, 2026
  2. added theissue type on Sep 30, 2026
  3. moved this to Todo in 2026on Sep 30, 2026
  4. edenreich commented on Sep 30, 2026

    @edenreich
    Contributor

    @claude Can you document this?

  5. inference-gateway-maintainer commented on Sep 30, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 1m 39s —— View job • docs/issue-873-20260930-1148 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-873-20260930-1148?quick_pull=1&title=Issue%20%23873%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23873%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Documented the subagent done signal and idle auto-close

    • Gather context (all tools.agent docs live in cli.md; a2a.md / observability.md only link to it)
    • Configuration reference covers tools.agent.idle_timeout (default 300, 0 disables, INFER_TOOLS_AGENT_IDLE_TIMEOUT, approvals pause the clock)
    • New "Done signal and idle auto-close" subsection: done: true in the INFER_SUBAGENT_RESULT_FILE result file, [Subagent Completed] / [Subagent Idle] / [Subagent Closed] notes, every completed turn with text counts as done, CloseSubagent only for stopping early
    • Removed tools.agent.interactive (multiplexer, layout, fallback) from the config block and env-var table; panes always open as a vertical split and always fall back to headless outside tmux
    • Validated: bun run format, bun run lint:md, bun run build all pass
    • Committed and opened docs: subagent done signal and idle auto-close #874

    Only cli.md changed - a2a.md describes interactive panes in one sentence that stays accurate and links here for the details, so it needed no edit.

    PR: #874
    | Branch

  6. inference-gateway-releaser commented on Oct 1, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.20 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions