[FEATURE] Log reasoning effort level in JSONL transcripts
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Workflow scripts can set per-agent effort levels via agent(prompt, {effort: 'low'}), and the main session's effort can be changed with /effort. But the effort level used for each API call is never written to the JSONL transcript — it's a request-side parameter that gets discarded. This makes it impossible to analyze the cost/quality impact of effort tiering after the fact, whether through custom indexing tools or simple jq queries over transcripts.
Proposed Solution
Add an "effort" field (e.g. "low", "medium", "high") to the assistant record in the JSONL transcript, at the same level as "model" and the "usage" block. The value is already known at serialization time — it just needs to be persisted alongside the response.
Use Case Example:
Additional Context:
---
Want me to write this to a file so you can copy-paste, or are you good grabbing it from here?
Alternative Solutions
Hooks don't expose request-side parameters (effort, model, temperature), so there's no way to capture this from outside the harness. The Anthropic API response also doesn't echo back the effort level, so it can't be reconstructed from response data alone.
Priority
Medium - Would be very helpful
Feature Category
API and model interactions
Use Case Example
- I run multi-agent workflows with tiered effort levels — Haiku/low for binary verdicts, Sonnet/medium for reviews, Opus/high for complex coding
- I index transcripts with a local tool to track per-subagent costs by model, effort, and turn count
- Without the effort field in transcripts, I can't distinguish a $0.06 Haiku/low agent from a $0.06 Haiku/high agent, so I can't validate whether lower effort actually saves tokens or degrades quality
- With the field present, I can query
cost --by model,effortand refine my tiering guidance empirically
Additional Context
The usage.speed field (fast vs standard) is already logged — effort is the analogous missing dimension. Adding it would complete the picture for users who tune workflow agent parameters for cost efficiency.
- Feedback ID: aecab372-c204-4fe2-8e32-5df5423ed3e9
3 Comments
This absolutely should be done.
True that.
My thinking was "Just expose the effort to the model's reasoning" (so that the model can add it to commits), and I created #71537, but if it's in JSONL, I guess the model can access it there too (not 100% sure).
I was also surprised this isn't in the JSON already. We'd love to have this here for all the reasons stated, in order to distinguish what's working on what level of effort.
This shipped in v2.1.212: session transcripts now record the reasoning effort level on each assistant message (an
effortfield on the assistant record, alongsidemodelandusage), so you canjqit out of the JSONL for per-agent cost analysis. Changelog: https://github.com/anthropics/claude-code/blob/main/CHANGELOG.mdClosing as shipped.
🤖 Generated with Claude Code