Summary
AgentRunListSessionsResult currently returns only session IDs:
type SessionListResult struct {
SessionIDs []string `json:"sessionIds"`
}
For operators inspecting multi-session pools, the missing fields (cwd, current model, in-flight prompt count, optionally created-at) require a follow-up RPC per session, or aren't available at all. The runtime already tracks (id, cwd, models, inflight) on sessionState; surfacing it through the wire layer is mostly plumbing.
Proposed shape
type SessionInfo struct {
ID string `json:"id"`
Cwd string `json:"cwd"`
CurrentModelID string `json:"currentModelId,omitempty"`
Inflight int `json:"inflight"`
}
type SessionListResult struct {
Sessions []SessionInfo `json:"sessions"`
}
(Old SessionIDs []string shape goes away — pure forward-compat add since list-sessions is new in this multi-session work and hasn't shipped to a public release yet. If we wait, the field becomes load-bearing and harder to evolve.)
Touched
pkg/agentrun/api/types.go: SessionListResult + new SessionInfo
pkg/agentrun/runtime/acp/runtime.go: new Manager.Sessions() []SessionInfo (or extend SessionIDs() — name TBD)
pkg/agentrun/server/service.go: ListSessions handler maps runtime → wire
pkg/ari/api/types.go: ari mirror types
pkg/ari/server/server.go: ari adapter passthrough
pkg/ari/client/client.go: client decoding
cmd/massctl/commands/agentrun/list_sessions.go: render table instead of one-line-per-id
Estimate
~80 LOC + 2-3 tests, ~45-60 min.
Why deferred from #2
Surfaced in PR #2's second review pass. #2 already focuses on the multi-session feature primitive; this is a feature expansion on top — IDs-only is functional, just not maximally useful. Keeping it as a follow-up keeps PR #2's scope clear and lets each piece be reverted independently.
Summary
AgentRunListSessionsResultcurrently returns only session IDs:For operators inspecting multi-session pools, the missing fields (cwd, current model, in-flight prompt count, optionally created-at) require a follow-up RPC per session, or aren't available at all. The runtime already tracks
(id, cwd, models, inflight)onsessionState; surfacing it through the wire layer is mostly plumbing.Proposed shape
(Old
SessionIDs []stringshape goes away — pure forward-compat add sincelist-sessionsis new in this multi-session work and hasn't shipped to a public release yet. If we wait, the field becomes load-bearing and harder to evolve.)Touched
pkg/agentrun/api/types.go:SessionListResult+ newSessionInfopkg/agentrun/runtime/acp/runtime.go: newManager.Sessions() []SessionInfo(or extendSessionIDs()— name TBD)pkg/agentrun/server/service.go:ListSessionshandler maps runtime → wirepkg/ari/api/types.go: ari mirror typespkg/ari/server/server.go: ari adapter passthroughpkg/ari/client/client.go: client decodingcmd/massctl/commands/agentrun/list_sessions.go: render table instead of one-line-per-idEstimate
~80 LOC + 2-3 tests, ~45-60 min.
Why deferred from #2
Surfaced in PR #2's second review pass. #2 already focuses on the multi-session feature primitive; this is a feature expansion on top — IDs-only is functional, just not maximally useful. Keeping it as a follow-up keeps PR #2's scope clear and lets each piece be reverted independently.