Draw a background task as what it ran, and go there on a tap
A card in the session's panel said "background command" under every description -- and for Codex, which names a terminal by a process id and gives no description at all, that phrase was the whole of every card. Both halves of the answer are in the transcript rather than in what the provider says: a driver now reports which tool call its task belongs to (Claude's `task_started` carries the `tool_use_id`, Codex's terminal list the `itemId`), and `LiveSession::background_tasks` resolves those ids against the transcript into a sequence number and, where the provider said nothing, the command the call was made with. So the card draws the command, and the kind shrinks to a mark beside it whose name is what a screen reader is given. Tapping one goes to that call in the transcript, opened, which is where a backgrounded command's output already lands -- rather than drawing a second copy of it beside the panel. The journey is the one a reopened session already makes to put a reader back where they stopped, now one function (`travelTo`). It has to release the held backlog first: events arriving while the reader is away from the newest end are held rather than applied, so a task started since they scrolled back was in no row at all and the tap looked like it had done nothing. Verified against the sandbox on the emulator: the panel draws `sleep 120 && echo done` for an echo session's `/background`, and tapping it lands on that Bash card with its output showing.
This commit is contained in:
1 parent
3b309766d7
commit
cedb18e8c1
18 files changed
+635
-151
No files matched your search
@@ -385,7 +385,13 @@ written, and the fold uses that same predicate to decide a reply is settled.
|
||||
subagent directory. **What those tasks are is `GET /sessions/{id}/background`**,
|
||||
listed in the session's right panel above the subagents: runtime state, so it
|
||||
is never persisted and `null` -- not an empty list -- is what a session with
|
||||
no process answers. An `ambient` task is dropped from both the list and the
|
||||
no process answers. **A task is drawn as the command it ran, and tapping it
|
||||
goes to the call that started it** -- both from the transcript rather than
|
||||
from the provider: a driver reports which tool call its task belongs to and
|
||||
`Session::background_tasks` resolves that id into a seq and, for a provider
|
||||
that says nothing (Codex names a terminal by a process id), the command on
|
||||
the call. The phone travels there with `travelTo`, the same journey a
|
||||
reopened session makes to put a reader back where they stopped. An `ambient` task is dropped from both the list and the
|
||||
count, on the CLI's own instruction: a live-update watcher is not activity,
|
||||
and counting one leaves a session `waiting` for ever. An adopted CLI is sent a repeated `initialize` to ask
|
||||
for the current set. Reconcile only between turns or at a result boundary:
|
||||
|
||||
Reference in new issue
Block a user