Repository navigation
Replies: 5 comments
|
+1. Concrete case from daily use: when an agent starts a dev server today, it's either a provider background shell (agent sees output, I only see "Running: …") or I start it in the terminal drawer (I see live logs, the agent can't read them). Agent-owned runs in a thread terminal (#8714) plus a visible result per run would let both of us see the same process, and stop it from either side. |
|
A related bug: a background test run triggers a false "Thread completed" I keep getting "Thread completed" notifications for threads that are still waiting on a test the agent started in the background. Here's the sequence:
The cause is This proposal could fix that. A tracked run is either:
That only covers saved actions, though, so ad-hoc commands still need a fix. Two smaller changes would help in the meantime:
Separately, the status vocabulary is muddled. Run status |
|
+1, and the "false Thread completed" bug (is that really a bug?) is the symptom of the same root cause: the run belongs to the agent, so the app has to guess what the agent will do next. What ended up working for me, outside T3 Code ->> the run belongs to a controller, not to the agent. The agent asks for a named preset (lint, typecheck, build, tests) for a specific worktree over MCP, the controller queues it (one at a time per project, so two threads cannot start two builds at once), runs it, and stores the result with the commit and the uncommitted diff it ran against. The agent polls or waits for a terminal state and the result is the same record I read from the dashboard or from my phone. Nothing in the thread's terminal, nothing to scroll back through, and a green result cannot be mistaken for a green result on different code, which was my actual problem. And yes, it's sharable across all coding apps / agents / etc. Dev servers are a separate thing in that model, because they are not finite ( I'm don't want to spend tooo much on hw). A thread claims a project (or better claims dev server) before starting or switching the server, the claim expires, and the server keeps running after the thread settles by design. That answers the "hand-off at the end of a turn" case directly: the hand-off is explicit, visible, and not tied to the thread lifecycle. Mine is here if the comparison helps the design: https://github.com/pioootrek/worktree-control (pre-1.0, Linux verified). It sits next to T3 Code (on my remote linux coding worker) rather than inside it, but the two pieces that mattered were "run has a result record" and "the result names the code it ran on", which this proposal already lists. |
|
Another case for this, from a Claude thread on desktop The agent started a long verification job with Bash What would have answered that without asking:
The output tail is the part #15584 leaves out, and it matters most for long jobs that print progress. One catch: Python and many other tools buffer stdout when it goes to a file, so a live tail can sit unchanged while the job is working. Showing "last output 4 min ago" next to the tail would stop a quiet job reading as a hung one. |
|
Another example from today, on GPT (Codex) was overseeing implementation delegated to Claude through async About seven minutes later, I noticed from my phone and told GPT that Claude looked finished. GPT read the handoff and continued with verification, independent review and pushing the branch. When GPT subsequently stopped the dev server with SIGTERM, its “Delegated task … finished” notification arrived about 190 ms later. Stopping the server also woke Claude with a “Command … failed” notification, prompting another turn explaining that exit 143 was an intentional shutdown. The source explains the delay: This adds another example of the job/service distinction from my earlier comment: a child needs to hand back its result while leaving a service available for verification, without losing the protection against reporting completion before tests finish. From mobile, I had to recognize the stalled handoff and intervene. |
Uh oh!
There was an error while loading. Please reload this page.
Problem
I'd like to do almost all of my development from the mobile app, without opening a terminal. Most of that works well: I ask the agent, review the diff, and settle. The weak spot is anything that keeps running or produces a pass/fail result, like a dev server or a build.
${script.command}\rinto a thread terminal (ChatView.tsx). There's no running/succeeded/failed state, exit code, stop, or restart. Reading scrollback on a phone is the only way to know whether a build passed.Building on #8714
#8714 lets agents list, run, and stop saved project scripts in terminals they own, without passing raw command text. This proposal is the follow-up that gives those runs, and user-started actions, a result that every client can show.
Most of the rest exists too:
ProjectSetupScriptRunneralready wraps setup scripts in an exit-code marker and gets a real status, duration, and output.TerminalManagerreportshasRunningSubprocess, persists history, and keeps busy terminals open on settle.PortScannerlinks a listening port to{ threadId, terminalId }.Proposal
runScript. Web, mobile, and the feat(mcp): run saved project scripts #8714 tools call the same service method instead of opening a terminal and writing to it from the client. That brings mobile parity and removes the duplicated client logic.running | succeeded | failed, the exit code, and the duration.ExecutionEnvironmentCapabilitiesflag lets older servers hide the feature.Ownership follows the existing terminal rules. The thread that started a run owns it. The run stays open on settle like other terminals, and archive and delete clean it up.
Questions
t3_project_script_runover a provider background shell for a saved dev-server or build action? That would make the experience consistent, but it changes agent behavior.Out of scope
nohup/setsid([Bug]: Settle leaves running a dev server the agent started withnohup … &, and nothing in T3 can find or stop it afterwards #15241).Related
nohup … &, and nothing in T3 can find or stop it afterwards #15241If this direction works for you, I'm happy to implement it on top of #8714.
All reactions