Skip to content

feature: differentiate concurrent coding-agent sessions in abctl #949

Closed

Description

@huang195

Feature Description

On a laptop several agent sessions run at once — two Claude Code windows in different repos, or
Claude Code and Bob side by side. Their events land in one undifferentiated stream today, so you
cannot tell whose tokens you are looking at, and per-session cost is not computable at all.

Proposed Solution

  • A stable session identity per agent invocation, surviving reconnects within a session
  • Every event attributed to a session — tool calls and non-LLM traffic included
  • Group and filter by session in the TUI; session visible in the events pane
  • Correct for two instances of the same agent, and for different agents concurrently
  • Session identity stored with the session record (feature: persist sessions #901) so it survives restart
  • A resumed or continued session distinguishable from a new one

Additional Context

Part of the Cortex v0.9.0 release, and on the critical path: this blocks per-session token and
cost aggregation, the TUI metrics view, and unattended agent workloads. The session-identity
schema should be agreed early — three separate owners depend on it.

Not to be confused with #182, which is the Kubernetes problem of correlating separate inbound
and outbound connections so token exchange picks the right user. This issue is about telling
local agent sessions apart on one machine.

Metadata

Metadata

Assignees

Labels

enhancementhigh priorityux

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions