Tool-call records
A tool-call record reports a coding agent's tool call that was observed but not graded. A record does not say whether the call ran.
For each record, Watcher stores the call's ID, the tool name, the time the call was observed and the reason it was not graded. Each request also names the agent and the agent's conversation ID, and the session it creates or joins is attributed to the caller (see Sessions and ownership). Watcher never stores tool input, output, a working directory, a file path or message text from a record.
Send records with POST /v1/sessions/tool-call-records. The Python SDK method
is record_tool_calls(request=...), with a ToolCallRecordsRequest. See
Authentication and permissions for who may call it.
Skip reasons
Every record has a skip_reason, which says why the call was not graded:
skip_reason | Why the call was not graded |
|---|---|
signed_out | No one was signed in to Watcher on the machine. |
auth_rejected | The server rejected the machine's credentials. |
credential_helper_unavailable | The configured credential helper could not supply credentials. |
watcher_offline | The local Watcher service on the machine was not running. |
grading_breaker_hold | The client paused review after repeated grading timeouts. |
transcript_unavailable | The agent's transcript could not be read. |
empty_transcript | The agent's transcript had no messages yet. |
hook_error | The client's hook failed before grading. |
watcher_ignore | The call was made in a session that a .watcher-ignore marker covered. The record never holds the marker's reason. |
unknown | None of the above, or the cause is not known. |
Request
{
"agent_platform": "claude_code",
"agent_session_id": "5d7c9b1e-2f40-4a6b-9c3d-8e1f0a2b4c6d",
"records": [
{
"tool_use_id": "toolu_01",
"tool_name": "Bash",
"observed_at": "2026-11-01T12:00:11Z",
"skip_reason": "signed_out"
},
{
"tool_use_id": "toolu_02",
"tool_name": "Bash",
"observed_at": "2026-11-01T12:00:41Z",
"skip_reason": "watcher_ignore"
}
]
}
agent_platformisclaude_codeorcodex. Other agents, including GitHub Copilot, are not supported yet and are rejected with HTTP 422.agent_session_idis the agent's own conversation ID: the Claude Code session ID or the Codex thread ID. Use the same ID your transcript uploads carry.tool_use_idis the agent's own ID for the call, as its transcript records it.observed_atmust include a time zone. A time in the future, or before 2024, is stored as the time Watcher received the record.- A request holds 1 to 500 records. IDs and tool names are at most 256 characters and cannot contain a NUL character. One invalid record rejects the whole request with HTTP 422.
- Any field not listed here is rejected with HTTP 422, so nothing else can be stored.
Response
{
"session_id": "0f3c2a5e-7d41-4c9b-8e2f-1a6b5c4d3e21",
"records": [
{"tool_use_id": "toolu_01", "status": "stored", "content_state": "metadata_only"},
{"tool_use_id": "toolu_02", "status": "stored", "content_state": "metadata_only"}
]
}
session_id is Watcher's ID for the
session the records belong to.
records holds one result per distinct tool_use_id, in the order each ID
first appears in the request. Match results by tool_use_id. When one request
repeats an ID, Watcher keeps the first record.
status | Meaning |
|---|---|
stored | Watcher now holds the call without content. |
linked | Watcher already held the call's message, so the record became an ordinary tool call linked to it. |
ignored_existing | Watcher already held the call in a state the record cannot change, or retention removed the session's content and kept only the call's outcome. Nothing changed. In the retention case content_state reads metadata_only, though Watcher holds only that outcome. |
content_state says what Watcher holds for the call afterwards: linked or
metadata_only.
Sessions and ownership
The session is found or created from agent_session_id as
POST /v1/ingest finds it, within the same
write scope. Records have no
identity.login_name, so a sessions:write:any key records under its own
identity rather than a developer's:
- Records match only sessions the caller could upload to. A developer's records and an ingest-only key's records of the same conversation land in separate sessions.
- Recording never changes a session's owner, including a session with no owner.
A session created by records alone has no messages. It does not appear in
session lists, session search or dashboard totals, and it is not graded, until
its transcript arrives. Until then, the organization's session-content
retention policy dates it by its newest record's observed_at: once that is
older than the retention period, the records are removed like any expired
session's content. Its calls appear in POST /v1/tool-calls/search when
the request sets include_records: true, as metadata_only rows
with no message to link to (see the Python SDK tool-call
list).
Linking to the transcript
A recorded call becomes an ordinary tool call, linked to the message that
contains it, as soon as Watcher holds that message. The order does not matter:
a record sent after the transcript links at once, and a transcript uploaded
after the record links the call during that upload. The call keeps its
skip_reason. This holds for watcher_ignore records too: if the marker is
removed and the session's transcript is later uploaded, its recorded calls
link to their messages like any others.
Records never downgrade what Watcher already holds:
- A record for a call Watcher already evaluated changes nothing.
- A record for a call Watcher holds as not evaluated, for example one it saw
only in the transcript, adds its
skip_reasonto that call. - When retention has removed a session's content, a record for a call whose
verdict was kept is acknowledged as
ignored_existingwithout being stored. A record for a call the session never held is stored, and links if a later upload brings the session's content back, as when a resumed session uploads again. Until then it is removed by the next scrub of the session: an admin scrub, or retention once the record'sobserved_atis older than the retention window.
Sending the same request again changes nothing.
Errors
| Answer | Final? | Meaning |
|---|---|---|
422 | Yes, for that request | The request is invalid: a missing or extra field, an unsupported agent_platform, a time without a time zone, an unknown skip_reason, a NUL character or a size limit. Sending the same request again fails the same way. Nothing is stored. |
403 | Yes, for that credential | The credential cannot write sessions. Nothing is stored. |
503 session_resolution_conflict | No | The session's owner changed while the records were being matched. Nothing is stored. Retry after Retry-After, with bounded backoff. |
400 | No | The conversation's stored session cannot be matched safely, for example after a server rollback. Nothing is stored. Retry later. |