Public
Tracks claude agent status
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

claude-agent-status

A simple API for tracking Claude Code agent session status. Agents POST status updates; you GET the latest status per session.

Endpoints

POST — Report a status update

Send an agent status update. Requires an API key in the Authorization header.

curl -X POST <endpoint-url> \ -H "Authorization: Bearer <api_key>" \ -H "Content-Type: application/json" \ -d '{ "sessionId": "sess_abc123", "status": "working", "reason": "tool_start", "message": "Running bash command", "timestamp": "2025-01-01T12:00:00Z", "repos": [ { "repo": "tradeaze/tradeaze-monorepo", "branch": "claude/add-hooks", "isActive": true }, { "repo": "tradeaze/rider-app", "branch": "main", "isActive": false } ] }'

Response: 201 Created

{ "ok": true, "message": "Status update recorded" }

GET — Retrieve session statuses

Returns the latest status update per session for the client associated with the API key.

curl <endpoint-url> \ -H "Authorization: Bearer <api_key>"

Response: 200 OK

{ "client": "1", "sessions": [ { "session_id": "sess_abc123", "status": "working", "reason": "tool_start", "message": "Running bash command", "timestamp": "2025-01-01T12:00:00Z", "repos": [ { "repo": "tradeaze/tradeaze-monorepo", "branch": "claude/add-hooks", "isActive": true } ] } ] }

Fields

FieldTypeDescription
sessionIdstringUnique session identifier
statusworking | idle | blockedCurrent agent state
reasonstringWhy the status changed (see below)
messagestringHuman-readable description
timestampstringISO-8601 UTC timestamp
reposRepo[]Optional. Repos the session has checked out; may be empty

Repo

FieldTypeDescription
repostringRequired. e.g. tradeaze/tradeaze-monorepo
branchstringRequired. Checked-out branch
isActivebooleanOptional. The repo the agent is currently working in

repos is stored as a JSON column and always comes back from GET as an array — updates posted before this field existed (or that omit it) read back as [].

Valid reason values

  • working: user_prompt, tool_start
  • blocked: permission_request, agent_needs_input, plan_approval
  • idle: stop, session_end