claude-code - 💡(How to fix) Fix [DOCS] tool_decision OTel event documentation missing tool_parameters attribute

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

* `tool_parameters` (when `OTEL_LOG_TOOL_DETAILS=1`): JSON string containing tool-specific parameters:
* For Bash tool: includes `bash_command`, `full_command`, `timeout`, `description`, `dangerouslyDisableSandbox`, and `git_commit_id` (the commit SHA, when a `git commit` command succeeds)
* For MCP tools: includes `mcp_server_name`, `mcp_tool_name`
* For Skill tool: includes `skill_name`
* For Task tool: includes `subagent_type`
RAW_BUFFERClick to expand / collapse

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/monitoring-usage

Section/Topic

"Tool decision event" section under "Event Reference"

Current Documentation

The docs currently list these attributes for the claude_code.tool_decision event:

Attributes:

  • All standard attributes
  • event.name: "tool_decision"
  • event.timestamp: ISO 8601 timestamp
  • event.sequence: monotonically increasing counter for ordering events within a session
  • tool_name: Name of the tool (for example, "Read", "Edit", "Write", "NotebookEdit")
  • tool_use_id: Unique identifier for this tool invocation. Matches the tool_use_id passed to hooks, allowing correlation between OTel events and hook-captured data.
  • decision: Either "accept" or "reject"
  • source: Where the decision came from ...

The tool_result event on the same page includes tool_parameters (gated behind OTEL_LOG_TOOL_DETAILS=1), but the tool_decision event does not.

What's Wrong or Missing?

As of v2.1.157, tool_decision events now include a tool_parameters attribute when OTEL_LOG_TOOL_DETAILS=1 is set. This attribute contains tool-specific parameters (bash commands, MCP server/tool names, skill names) — the same payload documented for tool_result.

The tool_decision event documentation does not mention tool_parameters at all.

Suggested Improvement

Add a tool_parameters entry to the tool_decision attribute list, matching the existing tool_result documentation:

After:

* `tool_parameters` (when `OTEL_LOG_TOOL_DETAILS=1`): JSON string containing tool-specific parameters:
* For Bash tool: includes `bash_command`, `full_command`, `timeout`, `description`, `dangerouslyDisableSandbox`, and `git_commit_id` (the commit SHA, when a `git commit` command succeeds)
* For MCP tools: includes `mcp_server_name`, `mcp_tool_name`
* For Skill tool: includes `skill_name`
* For Task tool: includes `subagent_type`

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

PageLocationContext
https://code.claude.com/docs/en/monitoring-usage"Tool decision event" sectionMissing tool_parameters attribute

Total scope: 1 page affected

The tool_result event documentation already describes tool_parameters with the same field descriptions; the tool_decision event needs the identical attribute added. The env var OTEL_LOG_TOOL_DETAILS is already documented in the environment variables reference.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING