agent-session-format-check
agent-session-format-check verifies whether current Agent Sessions code can support the latest session formats, storage backends, and usage tracking from each supported agent's newest build. Use this skill weekly to detect compatibility drift after agent CLI updates, when monitoring flags shift, or before bumping maximum verified versions in fixtures, documentation, and tests.
git clone --depth 1 https://github.com/jazzyalex/agent-sessions /tmp/agent-session-format-check && cp -r /tmp/agent-session-format-check/skills/agent-session-format-check ~/.claude/skills/agent-session-format-checkSKILL.md
# Agent Session Format Check
Answer one precise question for every supported agent:
> Can current Agent Sessions code support the latest available session/storage/usage
> format from the latest available agent build?
The answer must be layered. Do not collapse version checks, stale samples, schema
fingerprints, discovery contracts, and usage probes into a vague severity label.
**Evidence-first:**
- Gather a report + sample paths first.
- Do not change parsers/fixtures/docs without explicit user approval.
**Related skill:** `agent-support-matrix` — maintains the matrix YAML, ledger, and
update-checklist workflow. This skill focuses on *detection and evidence collection*;
`agent-support-matrix` focuses on *recording and gating version bumps*.
**Process doc:** `docs/agent-support/monitoring.md` — defines the compatibility verdicts,
legacy severity model, cadence, and escalation workflow that feed into this skill.
---
## 1 Quick Start (all agents)
1. Run weekly monitoring:
```
./scripts/agent_watch.py --mode weekly
```
Report path prints to stdout and is written under
`scripts/probe_scan_output/agent_watch/*/report.json`.
2. In `report.json`, check each agent under `results.<agent>`:
- `compatibility.verdict`, `compatibility.scope`, `compatibility.blockers`,
and `compatibility.next_action`
- `verified_version`, `installed.parsed_version`, `upstream.parsed_version`
- `compatibility.latest_status` to distinguish `current_fetch_known`,
`cached_latest`, and unknown latest-source states
- `weekly.local_schema` (newest local session used for fingerprinting)
- `weekly.schema_diff` and `evidence.schema_matches_baseline`
- `evidence.sample_freshness` and `evidence.fresh_evidence_source`
- `compatibility.latest_real_session_failure` when a prebump attempt failed
- `severity` and `recommendation` only as legacy escalation fields
Interpretation:
- `supports_latest`: latest known build is covered by
`evidence.fresh_evidence_source == "latest_prebump_report"` and
`compatibility.latest_real_session_evidence == true` with
`compatibility.latest_status == "current_fetch_known"`.
- `supports_installed_only`: installed build is covered by non-stale real local
evidence, but latest is newer, cached from a prior report, unknown, or lacks
fresh real-session proof.
- `latest_unknown`: no configured/reachable latest source or no real-session
driver exists; do not claim latest support.
- `blocked_stale_sample`: evidence predates the installed CLI; run prebump before claiming support.
- `blocked_no_fresh_evidence`: a version changed but no fresh matching sample proves support.
- `format_drift_detected`: unknown schema/storage/usage fields appeared; update fixtures/parsers.
- `monitoring_broken`: latest source, usage probe, or discovery contract failed.
- `real_session_auth_failed` in blockers: the real-session driver ran but the
sandboxed agent was not authenticated; re-auth or provide the configured env
token, then rerun prebump.
---
## 1a Real-Session Prebump Validation (required before latest claims)
Weekly scanning samples the newest on-disk session, which can predate a CLI
upgrade and give a false "safe to bump" call (the codex 0.120.0 trap and the
copilot `session.shutdown` trap). When weekly reports
`recommendation == run_prebump_validator` — or before you stage any
`max_verified_version` bump or latest-support claim — run the prebump path for
every active agent being claimed. The driver exercises the currently installed
CLI once inside a sandbox and diffs its output against the fixture baseline:
```
./scripts/agent_watch.py --mode prebump --agent codex --agent claude
```
Exit-code contract:
- `0` — every requested agent produced a fresh session and the schema
matches baseline. Safe to bump.
- `2` — at least one fresh session's schema does **not** match baseline.
Do **not** bump; investigate the schema diff in
`scripts/probe_scan_output/agent_watch/<slug>-prebump/report.json`.
- `3` — at least one driver failed (timeout, auth, CLI not found, or
discovery contract violation — wrong session root, wrong glob, or
missing required event types).
- `4` — config/invariant error: unknown `--agent` (or one with no
prebump block), missing/invalid `discover_session` contract,
credential hygiene failure (oversize / mode), or sandbox breach
(copilot hermeticity gate). Re-run with
`--allow-real-home` only if you understand your real config dir will
be mutated for that one invocation.
Flags:
- `--agent <name>` (repeatable) — restrict to specific agents. An
unknown agent or one without a `prebump` config block exits 4.
- `--keep-sandbox` — preserve the temp `$HOME` for debugging.
- `--timeout-seconds N` — per-driver timeout. CLI flag overrides
per-agent config; falls back to config, then global default (120s).
- `--force-fresh` — suppress staleness evaluation for this run only (records
`stale_reason=forced_fresh` in the report).
- `--allow-real-home` — copilot/real-HOME opt-in after a sandbox-breach
diagnostic; never persistent.
Configured real-session drivers today are `codex`, `claude`, `gemini`,
`copilot`, `opencode`, `hermes`, `openclaw`, `cursor`, and `pi`. Droid is
legacy-only and excluded from active checks.
Prebump uses the hybrid env-var-first auth policy: if the relevant API-key
env var (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GEMINI_API_KEY`,
`FACTORY_API_KEY`, `GITHUB_TOKEN`) is set it is forwarded into the sandbox
and real HOME is never read. Otherwise the driver copies the declared
credential file from real HOME into the sandbox after running three hygiene
gates (64 KiB max, mode `0600`, ≤90-day mtime warning). v1 drivers:
`codex_exec`, `claude_print`, `gemini_prompt`, `copilot_prompt`,
`opencode_run`, `hermes_oneshot`, `openclaw_local_agent`,
`cursor_agent_print`, and `pi_prompt`. Some OAuth/keychain-backed CLIs use
`real_home_session: true`; run them with `--allow-real-home` so the session
lands in tUse when shipping a release of Agent Sessions — bumping version, updating CHANGELOG, building, signing, notarizing, publishing appcast, and creating a GitHub release.
Create and ship AgentSessions support for a new or changed local AI agent/provider. Use when adding, reviewing, testing, documenting, or marketing a provider integration, session parser, transcript source, support-matrix entry, verified-version bump, or provider UI surface; drives the full loop from pre-support research through binary install, real session capture, fixture redaction, parser/discovery/search/UI integration, QA, review/fix loops, support records, PR/release notes, and conservative marketing claims.
Maintain Agent Sessions agent support matrix and JSON/JSONL parsing compatibility. Use when checking upstream agent releases for session format changes, updating max verified versions in docs/agent-support/agent-support-matrix.yml, or updating docs/agent-json-tracking.md and fixtures/tests.
Capture deterministic macOS screenshots for testing, docs, release notes, and marketing assets. Use when asked to automate app screenshots, batch-generate screenshot sets, standardize window sizing/composition, or choose between Peekaboo and native macOS screenshot tooling.