Repository navigation
feat(studio): one run per chat, and continue any chat - #1205
Merged
Merged
Conversation
Runs listed every SDK trace as its own row, so one conversation showed up as many rows. Each chat now runs in its own SDK session (the agent's first chat keeps the agent id, so existing checkpoints and paused approvals are untouched), traces carry that id as gen_ai.conversation.id, and the Runs screen and the agent's Runs tab show one row per chat with its turns, last activity, tokens and cost. Opening a row switches the agent to that chat so the next message continues it; the agent Runs tab lists the selected chat's individual runs below. The chat panel's past-conversation view gets a Continue this chat button, and a restart reopens the most recently active chat. TraceSummary gains conversationId. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Runs listed every SDK trace as its own row, so one conversation showed up as many rows (the
implementershowed a dozen "Failed invoke_agent implementer" rows for one stuck chat). This makes each chat one run you can open and keep talking in.What changes
startAgentRunuses the current chat id as the session id. The agent's first chat keeps the agent id, so existing checkpoints and paused approvals are untouched. Checkpointhistory,forkandcomparefollow the agent's current chat.TraceSummary.conversationId(SDK): the root span'sgen_ai.conversation.id, so traces can be grouped by chat exactly. Untagged older traces fall into the agent-id chat.?chat=<id>) and makes it current. The latest trace is one click away.POST /agents/:id/chats/:sessionId/open(409 while running or paused, 404 for an unknown chat).Checked
chatRuns.test.ts: grouping, a new chat gets its own session, reopening the old chat continues it, restart picks the latest chat) and client tests 144.traces.api.md, one line) are clean.implementer:Not covered: flow specs still run under the agent id. The
/hooks/_triggerand inbound-event runs join whatever chat is current, as before.🤖 Generated with Claude Code