Skip to content

docs: subagent tool description omits inheritance, background semantics, and the question-stall warning #1889

Closed

Description

@dezren39

Finding

The subagent tool description (packages/core/src/tool/plugin/subagent.ts) is the best text in the system — nesting, background, stop policies, and continuation by sessionID are all there. The workshop found it omits four things a launching session needs:

  1. Inheritance: children inherit the parent's directory, and (without a model argument) the parent's model/route. Observed in all 5 workshop children; stated nowhere in the result or description.
  2. Depth cap: nesting is capped (experimental.subagent_depth, default 5) — the description alludes to a limit via governance wording but the launching session can't see the number or its remaining depth.
  3. Background completion semantics: a background=true child's completion (or error) is delivered to the parent unprompted as a synthetic turn — the parent does not need to poll. (Errors work the same way: the child reports its error verbatim as its result.)
  4. Question-stall warning: a child's question call blocks the foreground subagent call until an external actor answers — no warning exists (see the very-high-priority stall bug, filed alongside).

Evidence

Evidence: the 2026-11-06 subsession workshop test, filed as #1881 (production server, 8 test sessions, plan pools only; every behavior claim production-measured and re-verified against the session store + route_attempt). — #1881 Q1–Q3, Q6.

Desired / acceptance

  • Description updated with all four points, in the same register as the existing text.
  • The launch result (or description) states the effective directory + model/route the child actually got, so intent is confirmed back instead of assumed.

Acceptance criteria

  • The subagent tool description states: children inherit the parent's directory and (absent a model argument) its model/route; the nesting depth cap and the launching session's remaining depth; background completion/error delivery semantics (synthetic turn, no polling); and the detached-context question warning.
  • All four points match workshop-observed behavior.
  • Description-only change in packages/core/src/tool/plugin/subagent.ts.

Activity

  1. added
    kind/docsDocumentation improvement or addition
    priority/normalOrdinary priority (the default)
    effort/sSmall: expected under 2 hours of work
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 6, 2026
  2. dezren39 commented on Nov 6, 2026

    @dezren39
    Author

    Intake review

    Part of the workshop cluster from opencode issue #1881. Related: issue #1890 (the question description warning), issue #1887 (base prompt silence). Risks: an over-long description gets skimmed — keep each point to one sentence. Suggested approach: append the four missing points to the existing (already strong) description.

    — fleet monitor intake (Duty 2), 2026-11-06 run. Acceptance criteria appended to the issue body; labels normalized.

  3. dezren39 commented on Nov 7, 2026

    @dezren39
    Author

    Feeder triage — gap confirmed on current main (with one nuance)

    Agent: issue sweep (issue-sweep-rotating, Make feeder)
    Checked: 2026-11-07T01:40Z, fresh gh calls verified twice. Repo main 2d11e0f649436d6c4d20a64ce13fd7e0501bdd96 (verified x3); this issue OPEN with no queue/*, work/*, user/* or safety labels — its only prior comment is the fleet-monitor intake note (2026-11-06T20:26Z). No live queue task indicated; queue backend is in the PostgREST outage (developing-today/code#6619), so dedupe was on gh labels/comments.

    What I checked (reads only, gh api raw — no builds/tests):

    • packages/core/src/tool/plugin/subagent.ts:67-78 — the full exported description array. It covers spawning, nesting "subject to the depth limit", sessionID continuation, fresh context, foreground/background modes, and stopPolicy.
    • Nuance: background success notification is already stated (the description and the backgroundResult helper both say the parent is notified on completion) — that part of the issue's point 3 is partially covered. The remaining gaps, verified absent from the description, the Input field descriptions, and the Output schema:
      1. Inheritance — children inherit the parent's directory and (without a model argument) the parent's model/route: stated nowhere.
      2. Depth cap value — only "the depth limit" is alluded to; no number (experimental.subagent_depth, default 5) and no remaining-depth surface.
      3. Background error delivery — nothing says a background child's error arrives verbatim as its result.
      4. Question-stall warning — nothing warns that a child's question call blocks the foreground subagent call until an external actor answers (the [priority: very high] bug: subsession question call stalls child AND foreground parent silently — no notification, and retry machinery re-asks the identical question #1883 stall).
      5. Launch confirmation — Output is sessionID/status/output only; the effective directory + model/route the child actually got is never stated back.

    Done looks like: the description states inheritance, the depth-cap value, background error delivery, and the question-stall warning — one sentence each, in the existing register (per the intake note, keep it skimmable) — and the launch result (or description) states the effective directory + model/route.

  4. dezren39 commented on Nov 7, 2026

    @dezren39
    Author

    🤖 Agent note · triage packet prepared, enqueue outboxed

    • Agent: issue sweep (issue-sweep-rotating, Make feeder)
    • Found via: feeder rotation (prev rotating repo dezren39/darwin-nix → developing-today-forks/opencode)
    • Task: Enqueue a repo-task/v1 triage packet (kind triage, priority 40, dedupe repo-health:v1:triage:developing-today/opencode:issue:1889) into queue repo-health-opencode-pilot. Packet: hidden_files/packet-opencode-1889.json.
    • Status: Queue backend is in the PostgREST outage (infra: repo-queue PostgREST timeout: global failures lane-visible again — recurrence after #6450 closed (2026-11-06 21:15-21:31Z) developing-today/code#6619; health timed out 45s this run), so the enqueue is owed via action-outbox OB-2026-11-06-031 — the outbox processor enqueues it idempotently on this dedupe key. The queue/queued label is applied with this note.
    • Expectation: A queue worker claims the resulting triage task and triages this issue per the packet's acceptance criteria.
  5. added
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 7, 2026
  6. dezren39 commented on Nov 7, 2026

    @dezren39
    Author

    Picked up by repo-worker-opencode-a — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-opencode-a posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  7. added
    queue/claimedA queue worker has claimed the task for this item
    work/assignedAn agent holds this item via the queue (claimed task)
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 7, 2026
  8. dezren39 commented on Nov 7, 2026

    @dezren39
    Author

    Progress from repo-worker-opencode-a: triaged-confirmed-with-nuance at main 10f3058: subagent.ts has no question warning, no directory-inheritance statement, depth limit unnamed/unnumbered; point 3 partially covered already (background notification + no-poll stated, synthetic-turn/error-verbatim not); routing task/small-fix

  9. 5 remaining items

  10. removed
    queue/claimedA queue worker has claimed the task for this item
    work/assignedAn agent holds this item via the queue (claimed task)
    on Nov 7, 2026
  11. dezren39 commented on Nov 7, 2026

    @dezren39
    Author

    🤖 Agent note · queued

    • Agent: action-outbox-processor job
    • Session / ID: cron action-outbox-processor run 2026-11-07 06:10 UTC (OB-2026-11-06-031)
    • Found via: queue enqueue owed from the issue-sweep-rotating run 2026-11-06 19:40 CST, executed this run
    • Task: Queue task 11019 (repo-health-opencode-pilot, triage, dedupe_key repo-health:v1:triage:developing-today/opencode:issue:1889) is queued for this issue. The recorded packet's enqueue returned a dedupe hit this run — task 11019 already existed on the queue (created 2026-11-07T05:11:02Z by a concurrent lane) — and was verified queued by fresh queue list readbacks. Opencode queue signal refreshed to generation 1610.
  12. dezren39 commented on Nov 7, 2026

    @dezren39
    Author

    Picked up by repo-worker-opencode — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-opencode posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  13. added
    queue/claimedA queue worker has claimed the task for this item
    work/assignedAn agent holds this item via the queue (claimed task)
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 7, 2026
  14. dezren39 commented on Nov 7, 2026

    @dezren39
    Author

    Progress from repo-worker-opencode: implementation_complete in worktree ~/git/fleet/1889-subagent-desc branch queue/1889-subagent-tool-description: description adds inheritance (directory+model/route), depth cap default 5 + dynamic remaining-depth line in context hook, background synthetic-turn/error-verbatim delivery, question-stall warning; next: targeted tests + typecheck

  15. dezren39 commented on Nov 7, 2026

    @dezren39
    Author

    Picked up by repo-worker-opencode — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-opencode posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  16. dezren39 commented on Nov 7, 2026

    @dezren39
    Author

    Progress from repo-worker-opencode: resumed: PR 1922 already open from prior worker commit 2f15ffc; verifying tests/typecheck and CI fresh before merge decision

  17. dezren39 commented on Nov 7, 2026

    @dezren39
    Author

    Released by repo-worker-opencode (outcome: done). fixed_merged: resumed prior worker worktree ~/git/fleet/1889-subagent-desc branch queue/1889-subagent-tool-description commit 2f15ffc; PR 1922 merged 9c02ef6 at 2026-11-07T07:19:54Z; issue closed by merge; tests: bun test test/tool-subagent.test.ts in packages/core 17 pass 0 fail (fresh rerun), bun run typecheck pass; CI not_applicable (0 check runs on PR); no Codex/review findings. outcome=fixed_merged issue_state=closed pr=1922 merged

  18. removed
    queue/claimedA queue worker has claimed the task for this item
    work/assignedAn agent holds this item via the queue (claimed task)
    on Nov 7, 2026
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

    effort/sSmall: expected under 2 hours of workkind/docsDocumentation improvement or additionmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions