You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 67dcdd8
Browse filesBrowse the repository at this point in the historyBrowse files
fix(claude-cowork): a result with no decision never consumes a reject; page nits (TH-8296)
- Pair a tool_result with its tool_decision only by tool_use_id, else by tool
name plus decision_type. A result that carries no decision_type and matches
no decision by tool_use_id now pairs with nothing, so an earlier reject keeps
its own span instead of being consumed as the oldest same-name decision.
Test covers the result with and without an unmatched tool_use_id.
- Page: the pairing rule says what happens to such a result; the name filter
also rejects tab (pinned by a test); a rejected MCP call's names appear only
when tool_decision carries tool_parameters, which Cowork's reference does
not list; user.id is on spans only when Cowork sends the account UUID
(absent on third-party deployments); the description says "by default".
Co-Authored-By: Claude Opus 5.5 <[email protected]>
err="rate_limit_error: proxy https://gw.internal/v1 for /Users/alice/project rejected the request"
Copy file name to clipboardExpand all lines: src/pages/docs/integrations/coding-agents/claude-cowork.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: "Claude Cowork session tracing with Future AGI"
3
-
description: "Trace Claude Cowork activity in Future AGI from Cowork's admin OpenTelemetry export: one trace per prompt with model requests, tool calls, approvals, tokens, cost, and errors. Prompt text, tool inputs, file paths, and emails are stripped before Future AGI stores anything."
3
+
description: "Trace Claude Cowork activity in Future AGI from Cowork's admin OpenTelemetry export: one trace per prompt with model requests, tool calls, approvals, tokens, cost, and errors. By default, prompt text, tool inputs, file paths, and emails are stripped before Future AGI stores anything."
|`api_request`|**Cowork model request** (LLM) | model, input tokens (including cache reads and writes), output tokens, cache read and write tokens, `cost_usd` as `gen_ai.cost.total`, duration, speed |
110
110
|`api_error`|**Cowork model request**, status `ERROR`| model, HTTP status code, the Anthropic error type (such as `rate_limit_error`) as `error.type` and in the status message, attempt, duration |
111
111
|`tool_result`| tool span named after `tool_name`; an MCP call is named `mcp__<server>__<tool>`| success, duration, approval decision and its source, result size, MCP server scope, and from `tool_parameters` only the MCP server and tool names, the skill name, and the subagent type. `success: "false"` marks the span `ERROR`|
112
-
|`tool_decision`| tool span, only when the decision is `reject` and no `tool_result` follows for that call | decision and source, and the same names |
112
+
|`tool_decision`| tool span, only when the decision is `reject` and no `tool_result` follows for that call | decision and source, and the same names when the event carries `tool_parameters` (Cowork's reference does not list it on `tool_decision`, so a rejected MCP call can show as `mcp_tool`) |
113
113
114
-
Every span carries `session.id` and `user.id`, so model requests and their cost count under the user in [Users](/docs/observe/features/users). The prompt span also carries the prompt's total tokens as `cowork.prompt.input_tokens` and `cowork.prompt.output_tokens`, and its tool-call count (rejected calls are not counted). Cost is Anthropic's estimate from the event, not your bill.
114
+
Every span carries `session.id`, and `user.id` when Cowork sends the account UUID, so model requests and their cost count under the user in [Users](/docs/observe/features/users). Third-party deployments of Claude Desktop send no account UUID, so their spans have no `user.id` and do not appear in Users. The prompt span also carries the prompt's total tokens as `cowork.prompt.input_tokens` and `cowork.prompt.output_tokens`, and its tool-call count (rejected calls are not counted). Cost is Anthropic's estimate from the event, not your bill.
115
115
116
116
The prompt span is `ERROR` only when its last model request failed. A request that hit a rate limit and that Cowork retried successfully stays `ERROR` on its own model-request span, and the prompt is not marked. A failed tool marks only its tool span.
117
117
118
-
A `tool_result` is paired with its `tool_decision` by `tool_use_id` when the events carry one, and otherwise by tool name and decision, so a rejected call stays visible when the agent then retries the same tool.
118
+
A `tool_result` is paired with its `tool_decision` by `tool_use_id` when the events carry one, and otherwise by tool name and decision, so a rejected call stays visible when the agent then retries the same tool. A `tool_result` that carries no `decision_type` and matches no decision by `tool_use_id` is not paired, so an earlier reject still gets its own span.
119
119
120
120
Cowork's exporter delivers at least once. The bridge skips a record identical to one it already received for the same prompt, so a re-sent batch does not change the prompt's totals.
121
121
@@ -139,7 +139,7 @@ By default the bridge forwards metadata only, whatever Cowork sends. On a first-
139
139
|`tool_input` (tool arguments) | dropped | tool span input, as Cowork sends it: shell commands, file paths, URLs, and any email addresses in the arguments |
140
140
|`error` on a failed `tool_result`| dropped, status message is `tool failed`| status message, which can name files, paths, and accounts |
141
141
|`error` on `api_error` (the API's message) | dropped, status message is the HTTP status and the Anthropic error type, such as `HTTP 429 rate_limit_error`| status message |
142
-
|`tool_parameters` (commands, file paths, URLs, MCP server and tool names, skill names) | names only: the values of `mcp_server_name`, `mcp_tool_name`, `skill_name`, and `subagent_type`, and only when the value has at most 128 characters and no `/`, `\`, `@`, or line break. Commands, file paths, URLs, and every other key are dropped | same as default |
142
+
|`tool_parameters` (commands, file paths, URLs, MCP server and tool names, skill names) | names only: the values of `mcp_server_name`, `mcp_tool_name`, `skill_name`, and `subagent_type`, and only when the value has at most 128 characters and no `/`, `\`, `@`, line break, or tab. Commands, file paths, URLs, and every other key are dropped | same as default |
143
143
|`user.email`, `user.account_id`, the device-level `user.id`, `workspace.host_paths`, `enduser.id`, `process.owner`| dropped (`user.id` in Future AGI is the account UUID) | dropped |
144
144
145
145
The bridge has no pass-through. A field that is not in the table above or in [What is captured](#what-is-captured) is not forwarded, so a new field Cowork adds later stays out until the bridge maps it. MCP server, tool, and skill names are names your admins or users chose (for example a connector called `gmail`); they are kept so tool spans can be told apart.
0 commit comments