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.
A simple API for tracking Claude Code agent session status. Agents POST status updates; you GET the latest status per session.
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" }
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 } ] } ] }
| Field | Type | Description |
|---|---|---|
sessionId | string | Unique session identifier |
status | working | idle | blocked | Current agent state |
reason | string | Why the status changed (see below) |
message | string | Human-readable description |
timestamp | string | ISO-8601 UTC timestamp |
repos | Repo[] | Optional. Repos the session has checked out; may be empty |
| Field | Type | Description |
|---|---|---|
repo | string | Required. e.g. tradeaze/tradeaze-monorepo |
branch | string | Required. Checked-out branch |
isActive | boolean | Optional. 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 [].
- working:
user_prompt,tool_start - blocked:
permission_request,agent_needs_input,plan_approval - idle:
stop,session_end