Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

"Open question" banner opens an empty new thread when the child thread runs on a linked environment

Aperta Adatta ai principianti
#27,005 2 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
frontend

Direzione di ricerca

Inizia da apps/web/src/components/chat/ThreadActivityBanners.tsx e apps/web/src/components/chat/useThreadLifecycle.tsx, poi leggi la definizione di EnvironmentThreadShell in packages/client-runtime/src/state/models.ts. Segui come viene passato l’ambiente del thread figlio quando lo si apre, incluso il banner del lavoro in background. Il lavoro è completato quando facendo clic sul banner di un thread figlio in un altro ambiente si apre quel thread nel suo ambiente; controlla i test pertinenti nelle aree di questi file.

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

Descrizione

What happened

Feature: Linked environments, a beta behind Settings → Labs.

A thread on machine A (macOS desktop) had a child thread running on linked machine B (Linux server), and that child was waiting on a question. The parent's timeline showed the child-input banner, with the child's title and an "Open question" button. Clicking it (or the child's title) opened an empty new-thread view, not the child thread. Opening the child's own t3-thread:// link showed the thread and its question correctly.

Diagnosis

The banner sends only the child's thread id. The click handler then pairs that id with the parent's environment:

  • childInputNowItem (apps/web/src/components/chat/ThreadActivityBanners.tsx:52 and :60) calls onOpenThread(child.id) / onOpenThread(first.id). Each child is an EnvironmentThreadShell, which already carries environmentId (packages/client-runtime/src/state/models.ts:138), but that id is dropped here.
  • onOpenRelatedThread (apps/web/src/components/chat/useThreadLifecycle.tsx:400–429) builds scopeThreadRef(environmentId, threadId) from the current thread's environment, then navigates to /$environmentId/$threadId.
  • childThreadInputsAtom (packages/client-runtime/src/state/threadShell.ts:383–420) deliberately includes children on other environments: tasks whose delegatedFrom points at this thread. For those, the route becomes /<A>/<B's thread id>, a thread A doesn't have.
  • Because the server sends shellThreadFamilies: true (apps/server/src/ws.ts:1788), the guard that would show "This thread is no longer available" is skipped. The app navigates anyway and lands on a blank thread/draft view.

Local subagents share the parent's environment, so this only goes wrong for cross-machine children. The banner was the only in-app way to reach this child's question: the child was also hidden from the sidebar and the Lineage panel (#27004). So the user had no working path to answer it.

Steps to reproduce
  1. Turn on Settings → Labs → Linked environments on machines A and B, and link A → B.
  2. From a thread on A, start a task on B that becomes a child of that thread: delegate_task with target.environmentId: <B>, or t3_thread_launch with environmentId: <B> plus delegatedFrom.
  3. Make the child ask a question or request an approval. For example, use a mode that prompts for tool approval, or have it call AskUserQuestion.
  4. In the desktop app, open the parent thread on A. The banner "Subagent needs input · · Open question" appears.
  5. Click Open question. Expected: B's child thread opens. Actual: an empty new-thread view for environment A opens.
Version

0.1.5-nightly.20261029.3877 (desktop app and both servers). The same code is on main as of 2026-10-29.

Environment

A: macOS (Darwin 27.0.0, arm64), desktop app 0.1.5-nightly.20261029.3877, Node 24.22.1. B: Linux x64 server 0.1.5-nightly.20261029.3877. Provider claudeAgent (claude-opus-5-5).

Evidence
# apps/web/src/components/chat/ThreadActivityBanners.tsx
<InlineButton tone="muted" onClick={() => onOpenThread(child.id)}>   # environmentId dropped
<InlineButton onClick={() => onOpenThread(first.id)}>

# apps/web/src/components/chat/useThreadLifecycle.tsx
const onOpenRelatedThread = async (threadId: ThreadId) => {
  const threadRef = scopeThreadRef(environmentId, threadId);         # parent's environment
Related issues
  • #19165 (closed as duplicate): "Open question" opens the child but no question shows. Different symptom: there the right thread opened.
  • #26766: a stale parent link on a remote child, in the opposite direction (child → parent).
  • #27004: t3_thread_launch threads with delegatedFrom are hidden, which is how this reporter's child had no other entry point.
Fix applied or workaround

None applied. Workaround: open the child through its t3-thread:// link (it includes B's environment id).

Suggested fix: change onOpenThread to take a ScopedThreadRef (or { environmentId, threadId }), and pass child.environmentId from childInputNowItem. The background-work banner's Open button (ThreadActivityBanners.tsx around line 174, onOpenThread(onlyThreadId)) uses the same id-only callback, so check it for the same assumption.

Filed by

Claude Code (claude-opus-5-5) via T3 Code triage

Lingua principale
TypeScript
Stelle
24.8k
Fork
6.4k
Merge medio
3h 20m
PR unite (30g)
208

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.