[BUG] decision_type field on tool_result OTEL events not populated in ~70% of cases since v2.1.143

Resolved 💬 1 comment Opened May 20, 2026 by nathanb9 Closed Jun 19, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The decision_type attribute on tool_result OTEL log events is inconsistently emitted starting in version 2.1.143. The documentation states this field should be
either "accept" or "reject", but it's absent (null) for ~71% of tool_result events in 2.1.143, up from ~54% in 2.1.142.

What Should Happen?

Per docs, tool_result events should include:

▎ decision_type: Either "accept" or "reject"

Every tool_result that has a corresponding tool_decision event (which is all of them) should carry decision_type forward from the decision context.

Observed Behavior

decision_type population rate by version (measured across ~12.5M tool_result events):

  ┌─────────┬──────────────┬─────────────────┐                                                                                                                    
  │ Version │ Release Date │ Population Rate │                    
  ├─────────┼──────────────┼─────────────────┤                                                                                                                    
  │ 2.1.136 │ May 8        │ 91%             │                    
  ├─────────┼──────────────┼─────────────────┤                                                                                                                    
  │ 2.1.138 │ May 9        │ 55%             │                                                                                                                    
  ├─────────┼──────────────┼─────────────────┤                                                                                                                    
  │ 2.1.141 │ May 13       │ 47%             │                                                                                                                    
  ├─────────┼──────────────┼─────────────────┤                                                                                                                    
  │ 2.1.142 │ May 14       │ 66%             │                    
  ├─────────┼──────────────┼─────────────────┤                                                                                                                    
  │ 2.1.143 │ May 15       │ 31%             │                    
  ├─────────┼──────────────┼─────────────────┤                                                                                                                    
  │ 2.1.144 │ May 18       │ 72%             │                    
  └─────────┴──────────────┴─────────────────┘                                                                                                                    

The drop is uniform across all decision_source values (config, user_temporary, user_permanent, hook) — it's not specific to any decision type:

``` ┌─────────────────┬───────────┬─────────────────┐
│ decision_source │ Total │ Population Rate │
├─────────────────┼───────────┼─────────────────┤
│ config │ 7,400,899 │ 39% │
├─────────────────┼───────────┼─────────────────┤
│ user_temporary │ 567,663 │ 74% │
├─────────────────┼───────────┼─────────────────┤
│ user_permanent │ 252,464 │ 30% │
├─────────────────┼───────────┼─────────────────┤
│ hook (accept) │ 31,341 │ 1.2% │
└─────────────────┴───────────┴─────────────────┘

### Error Messages/Logs

```shell

Steps to Reproduce

  1. Enable OTEL telemetry on Claude Code >= 2.1.143:

export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_LOGS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
claude

  1. Run a simple prompt that triggers multiple tool uses (e.g., "list files in this directory and read the first one"). This will generate Bash/Read tool calls.
  2. Observe the emitted OTEL log events in your collector. For each tool invocation you should see two events:
  • tool_decision — always has decision and source attributes
  • tool_result — should have decision_type and decision_source attributes
  1. Compare: Many tool_result events will be missing decision_type and decision_source, despite having a corresponding tool_decision event with the same

tool_use_id that correctly carries decision and source.

  1. Verify with a simple count:

-- If collecting to any SQL-queryable store:
SELECT
COUNT(*) AS total_tool_results,
SUM(CASE WHEN decision_type IS NOT NULL THEN 1 ELSE 0 END) AS has_decision_type,
SUM(CASE WHEN decision_type IS NULL THEN 1 ELSE 0 END) AS missing_decision_type
FROM events
WHERE event_name = 'tool_result';

  1. Expected: missing_decision_type should be 0.

Actual: ~70% of rows are missing on v2.1.143.

  1. Cross-reference with tool_decision:

SELECT
td.decision,
td.source,
tr.decision_type -- NULL despite td.decision being populated
FROM events tr
JOIN events td ON tr.tool_use_id = td.tool_use_id AND td.event_name = 'tool_decision'
WHERE tr.event_name = 'tool_result'
AND tr.decision_type IS NULL
LIMIT 5;

  1. This demonstrates that the decision was made and logged, but not propagated to the tool_result event.

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.131 =

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗