[Bug]: A child run started with `t3 thread send` from a shell never notifies the parent

Aperta Adatta ai principianti
#33,432 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Inizia in apps/server/src/orchestration-v2/Orchestrator.ts, in corrispondenza di recordSubagentFollowup, poi leggi i casi e i test correlati in DelegatedCompletionDelivery.test.ts. L’issue descrive una modifica proposta di una riga a una condizione e un test che riproduce l’assenza del follow-up. Il lavoro è completato quando il test di regressione fallisce prima della modifica e passa dopo, mentre gli invii da un thread diverso restano esclusi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/server

Steps to reproduce
  1. In thread P, call delegate_task to start child C. Let its first run finish.
  2. With P idle, run t3 thread send <C thread id> - from a shell with a short prompt.
  3. Wait for C's new run to finish.
Expected behavior

P gets a completion notice and a new run, as it does for a later run that P sends itself with t3_thread_send.

Actual behavior

P gets no notice and no run until something else wakes it. From T3's state DB (read-only), 2026-10-25 to 2026-11-09 13:44 UTC: 731 completed child runs were started this way, and 420 ended with the parent idle and no parent run within 10 s. Of 433 idle-parent runs that did get a delegated task, 2 had no parent run within 10 s.

Root cause: recordSubagentFollowup (apps/server/src/orchestration-v2/Orchestrator.ts) creates the follow-up task, which carries the notice, when the send is a notification, has createdBy: user, continues a usage-limit stop, or has senderThreadId equal to the parent. t3 thread send signs in as an MCP client with no thread, so its send is createdBy: agent with no senderThreadId and matches none of those. The gate is the same in 0.1.8-nightly.20261109.4399 and main (4f0b74e). #31707 reports the same symptom for remote children.

Proposed fix: count a send with no sender thread like a user send: (command.senderThreadId ?? parentThreadId) !== parentThreadId in that gate. A send from a different thread stays excluded. A patch is ready: one line plus a test in DelegatedCompletionDelivery.test.ts that fails before and passes after. Sending T3CODE_THREAD_ID from the CLI would hit assertLiveCaller, which refuses a thread with no active run, and the parent is idle by then.

Impact

Major degradation or frequent failure

Version or commit

0.1.8-nightly.20261105.4218

Environment

macOS 26.6.1 arm64, Claude provider. Checked with the new unit test and with t3_thread_send through the MCP toolkit with no thread scope against a replayed Codex provider (no follow-up task before, one after). The t3 binary and a live provider were not run.

Lingua principale
TypeScript
Stelle
24.8k
Fork
6.4k
Merge medio
8h 26m
PR unite (30g)
133

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pingdotgg/t3code

Tutte le issue di pingdotgg/t3code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.