Expose compact sessions automation state#2
Open
andrei-hasna wants to merge 2 commits into
Open
Conversation
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.
Summary
sessions list,history,watch --once,paths,recent,indexed-list,show, andgraph.sessions active-agentsandsessions session-health, plus MCP tools/resourcesactive_agentsandsession_health, and REST endpoints/active-agents,/session-health,/session-health/:id.Agent-state API notes
active-agentsinspects tmux panes and reports recognized agent composers by default. Use--include-unknownto include shells/unknown panes and--no-capturewhen only command/cwd classification is needed.session-healthreturns compact indexed session state, activity/health classification, resume command when stable, bounded issues, and evidence refs such assessions://session/...and transcript paths.Compatibility notes
--jsondefaults are preserved for the earlier compact-output commands unless an explicit new--limitis provided.include_full,message_limit,tool_call_limit,event_limit, andlimit.Adversarial review reconciliation
A read-only reviewer for this task flagged pretty JSON defaults, unredacted title leakage, unbounded string payloads, ambiguous ID lookup semantics, misleading totals, and non-health-oriented ordering. Reconciled by adding compact serializers for the new surfaces, redacted/bounded strings, lookup status metadata, real count queries, and last-activity ordering, with focused tests for the reviewed gaps.
Earlier compact-output review findings around MCP schema compatibility, unbounded
sessions_read, inaccurate hints, and missing coverage were also reconciled on this branch.Validation
bun testbun run typecheckbun run buildgit diff --checkactive-agents --limit 1 --no-captureandsession-health --limit 1both emit one-line JSON