Repository navigation
Wake a thread when a command it started exits, even after its turn ends #16588
shootingallday
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The gap
An agent often starts something long (a build, a test suite, a deploy, a script on another machine) and wants to hear back when it exits. Today that only works while the provider session is alive and only for providers with their own background tasks. If the turn ends, the session closes, or T3 restarts, nobody wakes the thread when the command finishes. Agents either sit in a foreground wait loop to keep the thread in Working, or hand-roll a detached job that posts a message into the thread on exit.
I run the second kind myself: a small CLI that runs a command detached and, on exit, sends the exit code and last lines into the thread through
orchestration.dispatchCommand. It works, but it lives outside T3, so T3 can't show it, stop it, or recover it after a restart.What I'd like
t3_thread_run, takes a command, cwd, an optional log file, and a deadline. T3 runs it outside the provider session and records it on the thread. When it exits, T3 posts a message into the thread with the exit code and the last lines of output, queued after any active turn.wakeOnregex wakes the thread on matching output lines, batched, plus always on exit.Related
Drafted with Opus 5.5 in Claude Code.
All reactions