GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Settle delegated and subagent child threads when their own run ends, not only when the parent settles · Issue #43545 · pingdotgg/t3code

Settle delegated and subagent child threads when their own run ends, not only when the parent settles #43545

New issue
Copy link
New issue
Copy link
Done
#43558
Done
Settle delegated and subagent child threads when their own run ends, not only when the parent settles#43545
#43558
Copy link
Labels
via-triageFiled through npx t3 triage

Description

@L-Blondy
L-Blondy
opened on Nov 26, 2026
Issue body actions

What happened

Child threads made by delegate_task (thread:delegated-task:…) and provider subagent threads (thread:subagent:…) stay unsettled after their task finishes and the parent has the result. They settle only when their parent settles.

A long-lived parent, such as a pinned coordinator thread, never settles. So its children never settle either. On one machine about 2,000 finished children stayed unsettled.

This also blocks worktree cleanup. A delegate_task child with isolation: "worktree" keeps its worktree on an unsettled thread, so cleanup that waits until every thread on a worktree is settled never frees it. We ran out of worktree resources and had to settle 279 children by hand.

Request: settle a delegated or subagent child automatically once its run has ended and the parent has its result (for example, when the parent reads the final result or task_status reports it done). A later message to the child unsettles it, as for top-level threads.

Diagnosis

Local children settle only through their parent:

  • The settlement candidate query (getSettlementCandidates in the projection store) returns a relationshipToParent: "subagent" thread only when its parent is settled, archived, deleted or missing.
  • ThreadSettlementService then auto-settles that child ("settles with the parent").
  • isAutoSettlementCandidate excludes pinned threads, and pinning has no expiry. So a pinned parent never settles, and its children wait forever.
  • Nested delegation has the same problem one level down: a grandchild waits for its child parent, which waits for the pinned root.
  • There is no setting for this. sidebarAutoSettleAfterDays and sidebarAutoSettleOnMerge do not apply to subagent children, because the sweep handles them before it reads settings.

Checked on current main: same behaviour. #42210 added settle-when-done only for tasks delegated from a linked environment (no local parent). Local children still wait for the parent.

Steps to reproduce

  1. Pin a thread (or keep it active).
  2. In that thread, start several children with delegate_task, some with isolation: "worktree". Native provider subagents also work.
  3. Let every child finish. Let the parent read each result (task_status reports done).
  4. Wait for several settlement sweeps (they run every minute).
  5. Call t3_thread_list with settled: false. All children are still unsettled, and their worktrees are still attached to unsettled threads.

Version

Server 0.1.13-nightly.20261125.5258. Behaviour confirmed in source at 0.1.11-nightly.20261119.4928 and on current main.

Environment

Linux, background service (serviceManaged: true). Heavy delegate_task use from a few long-lived pinned coordinator threads.

Evidence

Read-only query of orchestration_v2_projection_threads (not deleted, not archived, relationshipToParent = 'subagent'):

count
Unsettled children 2,500 (196 parents)
…thread:delegated-task:* 1,965
…thread:subagent:* 504
…latest run completed 1,933
…under one of 8 pinned root threads 2,218
…of those, with their own worktree 1,861
…whose direct parent is itself an unsettled child 649
Unsettled children whose parent is settled 0

The last row shows that settle-with-parent works. The gap is only parents that never settle.

Related issues

  • [Bug]: Settling a thread leaves its child threads open, so their worktrees are never cleaned up #29999, Settling a thread doesn't settle its finished subagent threads #33578: settling a parent did not settle its children (fixed: children now settle with the parent).
  • [Bug]: Cross-machine delegate_task children never settle on the target machine (mcp:launch threads stay unsettled) #42197 / fix(server): a task delegated from a linked machine settles there once its work is done #42210: tasks delegated from a linked machine now settle once their work is done. This request extends that to local children.

Fix applied or workaround

Settled 279 children by hand to free worktrees. No setting covers this.

Filed by

Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running inside T3 Code, following the triage playbook.

Activity

  1. L-Blondy
    added
    via-triageFiled through npx t3 triage
    on Nov 26, 2026
  2. juliusmarminge
    closed this as completedin #43558on Nov 26, 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

    via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.