Skip to content

Lineage omits older child threads and undercounts previous agents in a long-running thread #33409

Open

Description

@chrisprijic

What happened

A thread running for several days previously showed more than 100 subagent threads. Its Lineage panel now shows only 33 Previous agents (including 1 failed), plus 2 running agents. Read-only queries on the owning Mac mini show substantially more child threads still stored.

Diagnosis

The matching installed desktop bundle identifies version 0.1.7-nightly.20261103.4138, commit 115739c. Its ProjectionStore windowed subagent query keeps active statuses, or records whose run_id or parent_node_id belongs to the retained history window. Finished records outside that window are omitted. ThreadRelationshipsControl derives lineage from loaded shells and projection.subagents, then counts the resulting Previous agents rows. This makes incomplete history a strong explanation for the reduced count. It is a loaded-history window, not a verified time-based retention policy.

The exact bundled SQL predicate was executed in an in-memory SQLite fixture: an old completed record was omitted; a recent-run completed record, an active record, and a retained-node completed record were retained. This verifies the filter, but the exact remote snapshot producing 33 was not captured. All linked child thread rows exist and none is marked deleted; transcript completeness was not checked. Task records can share a child thread, so 627 task records must not be reported as 627 conversations.

Source: https://github.com/pingdotgg/t3code/blob/main/apps/server/src/orchestration-v2/ProjectionStore.ts and https://github.com/pingdotgg/t3code/blob/main/apps/web/src/components/chat/ThreadRelationshipsControl.tsx . Diagnosis was checked against the matching installed bundle because git network access was unavailable.

Steps to reproduce

Observed case, not a fresh deterministic reproduction:

  1. Run a parent thread for several days, repeatedly delegating to and following up with child agents.
  2. View its Lineage panel from a MacBook Pro connected to the Mac mini desktop backend.
  3. Observe the Previous agents count fall from more than 100 to 33 while the parent continues running.
  4. Compare the UI with read-only subagent and child-thread queries in the owning server database.
    Expected: older child threads remain discoverable and any partial count is clearly labeled. Actual: the panel shows 33 Previous agents despite at least 137 distinct completed child threads remaining stored.
    The precise triggering reload or reconnect is unknown.

Version

0.1.7-nightly.20261103.4138 (115739c)

Environment

Desktop backend on a Mac mini; UI on a MacBook Pro, macOS. Remote host OS and Node versions were not collected. Triage CLI only: 0.1.8-nightly.20261109.4399.

Evidence

Read-only SQLite results for the affected parent:
status       records  distinct_children  no_child_link  missing_children  deleted_children
completed        614                137              0                 0                 0
failed             1                  1              0                 0                 0
interrupted       10                 10              0                 0                 0
running            2                  2              0                 0                 0
Distinct counts are per status and must not be summed as a global distinct count.
Stored subagent start timestamps span 2026-11-05 through 2026-11-09 UTC.
Screenshot: Previous agents 33, 1 failed; Lineage 2 running.

Related issues

No confirmed duplicate or released fix found. Related implementation change #26762 removed automatic thread-family loading; it is context, not a proven cause. #22414 concerns obsolete Agents-panel scroll behavior and does not match this count mismatch.

Fix applied or workaround

No fix applied. All database access was read-only. A separate lightweight, paginated child-lineage listing would avoid tying discovery and counts to transcript history. No verified user workaround yet.

Filed by

Codex (GPT-6), via t3 triage, using user-supplied read-only query results from the Mac mini.

Activity

  1. added a commit that references this issue on Nov 11, 2026
    a14ab5d
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