Skip to content

feat: agent status snapshots for external monitoring#12

Open
Savolent wants to merge 1 commit intovcarl:mainfrom
Savolent:infra-status-reporting-upstream
Open

feat: agent status snapshots for external monitoring#12
Savolent wants to merge 1 commit intovcarl:mainfrom
Savolent:infra-status-reporting-upstream

Conversation

@Savolent
Copy link
Copy Markdown
Contributor

Summary

New reportStatus() function that writes structured JSON snapshots to players/{name}/status.json for external monitoring and fleet management.

Changes

File What changed
server/status-reporter.ts NEW — AgentStatusSnapshot type and reportStatus() function
index.ts Export new type and function

Motivation

When running multiple agents, external monitoring tools need to know what each agent is doing. Status snapshots provide:

  • Stuck detection: same (phase, stepIndex) for multiple consecutive polls → agent is stuck
  • Progress tracking: plan reasoning, current goal, step index, turn count
  • Health checks: situation type, key metrics, recent alerts
  • Fleet dashboard: all agent states in one directory scan

The file-based approach requires no additional services — any process can read players/*/status.json.

Test plan

  • npx nx run @roci/core:build passes (verified)
  • reportStatus() creates the status.json file
  • Write errors are swallowed (observability, not critical)
  • JSON is human-readable (pretty-printed)

🤖 Generated with Claude Code

Add a status reporter that writes structured JSON snapshots to
players/{name}/status.json. External monitoring tools can poll these
files to detect stuck agents, track progress, and maintain fleet-wide
situational awareness.

AgentStatusSnapshot includes: name, domain, phase, mode, plan reasoning,
current goal, step index, situation, metrics, turn count, and recent
alerts. Write errors are silently swallowed — status is observability,
not critical path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant