agent status --json - #184
Merged
Merged
Conversation
The human output is a report; there was no way to get the same facts as data. A tool that needs to *decide* something — "does this agent have hooks installed, and should I install them before recording a run?" — had to scrape the ✓/○ lines, which are prose and free to change. Emits every agent in the registry with `detected` and `hooks_installed`, keyed by the registry's own name. Absent agents are listed too: a caller choosing whether to install must tell "Atomic does not know this agent" from "known, and not set up", and an omitted entry cannot say which. Sorted, so diffing two runs shows real changes only. Sessions and totals carry the same detail `--verbose` prints, plus `sessions_error` when the session store cannot be read — the human output prints that and continues, and dropping it would make a broken store indistinguishable from an empty one. Follows `agent lifecycle`'s `--json`: same flag, `serde_json::to_string`, snake_case fields.
geekgonecrazy
approved these changes
Sep 3, 2026
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.
atomic agent statushad no machine-readable form. Tools that need to decide something — "does this agent have hooks installed, so should I install them before recording a run?" — could only scrape the ✓/○ lines, which are prose.Shape
--verboseprints;--verboseis ignored in JSON.sessions_errorappears only when the session store cannot be read. The human output prints that and continues; dropping it would make a broken store look like an empty one.Follows
agent lifecycle's existing--json: same flag,serde_json::to_string, snake_case.Why: Sherpa gates on this. Without the integration installed, an agent's turns are never recorded, so runs complete and the ledger stays empty — a silent gap. Detecting it needs a stable signal.
Checks:
cargo fmt --all --check,cargo clippy -- -D warnings,cargo check, and 9 tests inagent::status(4 new) all pass. Verified against a real repo — output matches the text form exactly.One note: the new tests do not assert that a bare fixture detects nothing. Several agents are configured in
$HOMErather than the repository, so that would depend on the machine running the test; they assert the flags agree with the registry instead.