0014 — Record every call_tool call in a call log, without arguments or results
Status: Accepted (2026-11-08). Written down on 2026-11-12 (wayfindr-q2rb); the decision shipped in 7d7967f to 57a9398 (wayfindr-9br6). Amended:
- 2026-11-09 (wayfindr-7a8p): a call that returns a question to the client ends as
input_required(0008). - 2026-11-11 (wayfindr-5rbg): each call also records the name of the client token it authenticated with (0012).
- 2026-11-12 (wayfindr-e1ky): a call that does not end
okalso records the error text the agent got back, cleaned and cut to 500 bytes.
Context
Agents call every upstream tool through one meta-tool (0001), so a harness's own history shows call_tool, not which upstream tool ran. Users want to see what their agents did: which tools, from which client, and whether each call worked.
A call's arguments and results hold the user's data: email bodies, documents, and whatever an upstream echoes back. Storing them would make the store a copy of everything an agent touched.
Recording a call must not slow it down or make it fail.
Decision
- Every
call_toolcall gets one row in acallstable: when it started, the connector and tool as the agent wrote them, the calling client, how long the upstream call took, and how the call ended (ok,tool_error,rejected, orfailed), with the error's Kind and Case. A call that returns a question ends asinput_required(amended 2026-11-09, wayfindr-7a8p). - Arguments and results are never stored. The exception is the error text of a call that does not end
ok(amended 2026-11-12, wayfindr-e1ky): for atool_error, the text of the upstream'sisErrorresult; otherwise the message Wayfindr returned. It is kept on one line, with control characters replaced, URL query strings masked, and at most 500 bytes. Anokorinput_requiredcall stores none. - The client is the
clientInfoname the client asserts. The stdio shim forwards its own client's name. Atoken_namecolumn holds the name of the client token the daemon verified,defaultor a scoped token's name, never a value (amended 2026-11-11, wayfindr-5rbg). calls.retentionsets how long a call is kept, 30 days by default. Every hour, calls older than that are deleted.0sturns the log off: nothing is recorded or deleted.- The gateway hands each call to a queue of 256 entries and returns. One writer stores the calls off the request path. When the queue is full, the call is dropped, and the daemon log says how many were dropped. At shutdown the writer stores what is queued for up to 2 seconds.
wayfindr callslists the log, through the admin API.
Consequences
- Users can see what agents did, by client and by token, without a second copy of their data.
- The log can't say what an agent sent or got back from a call that worked. The upstream's own records, if any, have that.
- A failed call says why, after the fact, in the upstream's own words. That text can quote what the agent sent, such as a search query, so it is cut short and deleted with its call.
- Under a burst of calls, the log may miss some rather than slow them down. The daemon log says when it did.
- A refusal is recorded with its own Case, so a call hidden by a tools list, a project scope, a profile, or a client token can be told apart (0009, 0010, 0011, 0012).
- The client name is what the client claims. Only
token_nameis verified. - With
0s, calls already in the log stay until the retention is set again.