t3code icon indicating copy to clipboard operation
t3code copied to clipboard

Triage files stay on the first machine when the triage draft is switched to another machine

Open pnupu opened this issue 3 weeks ago • 0 comments

What happened

Started "Triage an issue" in the desktop app from a thread on a remote machine (A). A's server wrote the session folder. The draft was then switched to the local machine (B) with the composer's "Run on" picker and sent. The thread ran on B, but its prompt still linked ~/.t3/userdata/triage/

Diagnosis

useStartTriage calls prepareTriage and openScratch on the picked machine, then seeds the draft with an absolute path on that machine (buildTriageAppPrompt). useDraftEnvironmentRouting.onEnvironmentChange retargets a No project draft to another machine and keeps the prompt. Nothing prepares the session again, warns, or blocks the switch. The context file also describes A's server, not the one the thread runs in. useStartTriage.ts, useDraftEnvironmentRouting.ts and triagePrompt.ts are byte-identical in v0.1.7 and main (2922e8fb5952).

Steps to reproduce

Replayed 2026-11-10.

  1. Desktop app with local machine B and a connected remote machine A.
  2. Open a thread on A.
  3. Command palette (Cmd+K) -> "Triage an issue". A draft opens for A.
  4. Switch the draft to B with the "Run on" picker in the composer.
  5. Send. Expected: the playbook and context are readable where the thread runs. Actual: the thread runs on B and the files exist only on A.

Version

Desktop client 0.1.7; machine A server 0.1.8-nightly.20261106.4262; machine B server 0.1.7

Environment

macOS 27.0.0 arm64 on both machines; desktop app on B; A connected as a remote environment

Evidence

UTC, 2026-11-10, from B's server trace and both file systems:
- 08:49:34 server.prepareTriage and projects.ensureScratch go to A; A writes triage/2026-11-10T08-49-34-092Z (context.md, triage-playbook.md).
- 08:49:45 the draft's workspace requests move to B.
- 08:49:58 thread created on B, in B's scratch folder.
- 08:50:02 Read of the linked path on B fails: "File does not exist". B's triage folder was last modified on Oct 30.
The same outcome happened on 2026-11-09 (A wrote 23:35:39, thread on B at 23:36:31).

Related issues

None found

Fix applied or workaround

Fetch the playbook from main, or run npx t3 triage on the machine where the thread runs. Starting triage from a thread on the machine you want avoids it.

Filed by

Claude Fable 5.2 in T3 Code (Claude Code harness)

pnupu avatar Nov 10 '26 09:11 pnupu