Repository navigation
feat(server): thread shells carry each agent's latest tool action - #21
Merged
Merged
Conversation
9 tasks done
OmarAlex24
marked this pull request as ready for review
November 11, 2026 19:37
OmarAlex24
force-pushed
the
feat/milestones-last-action
branch
from
November 11, 2026 19:47
4fbb358 to
165332f
Compare
Thread transfer impact
This comment will update automatically after the next completed run. |
Shells gain an optional latestAction ({ summary, detail?, at }) from the
thread's newest tool item (commands, file changes, searches, other tools),
labeled with deriveToolActivityPresentation and capped at 120 characters.
The list path reads it with one indexed lookup per thread and strips tool
output before decoding; the projection path picks the same item.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shell stream drops subagent transcript events, so a child's latest action never reached clients. A finished tool item now passes the filter; streaming output still does not, so this costs one shell refetch per tool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread rows read the quiet shell, which holds through streaming ticks. The latest action changes with every tool call, so it is overlaid like the item counts while the run streams. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a raw tool name Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OmarAlex24
force-pushed
the
feat/milestones-last-action
branch
from
November 11, 2026 20:47
165332f to
66b65f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The milestone map needs to say what each agent did last: "Edited src/auth/refresh.ts", "Ran command · pnpm test", "Asked for a secret". Thread shells only carried the latest visible message. A client would have had to load every agent's transcript to find its last step.
Fix
The data.
latestActionwithsummary,detailandat. It is the thread's most recent tool step (command, file change, file search, web search or MCP tool), labelled the way the chat's work log labels it.mcp__server__prefix.ProjectionStorefinds it with one indexed lookup per shell. Fork migration 4 adds the partial indexorchestration_v2_projection_turn_items_latest_tool_idxon tool items.Keeping it current without extra traffic.
latestActionis overlaid like the item counts, so a new action doesn't re-render quiet rows mid-run.Notes
Test plan
latestAction.test.tstable: searches, reads, T3 MCP tools ("Marked a milestone", "Asked for a secret", "Failed to delegate a child task"), other MCP tools with the prefix stripped, and reasoning or messages reading nullProjectionStore.test.ts: shells carry the latest tool action, both from the shell list and from the projectionShellStream.test.ts: a subagent's tool publishes its shell when it completes or fails, not while it runsthreadShell.test.ts: the existing quiet-shell case now also changeslatestActionmid-run and still holdsForkMigrations.test.ts: the fork history includes migration 4Built with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code