Question
Claude Code's /btw feature creates aside_question sidechain log files under subagents/ that appear to re-log the entire conversation history with full usage metadata. ccusage reports these as significant costs, but I'm not sure if these represent real API calls or just duplicate log entries of the same conversation.
Has anyone else noticed this? Are the reported costs for /btw accurate, or is ccusage overcounting?
What I'm seeing
In a session with ~135k context, a single /btw question created a sidechain log with 60 "turns" and ccusage reported ~$6-7 for it — even though /btw is supposed to be a single one-shot question/answer.
In a longer session (~700k context), multiple /btw uses created sidechain logs with 1,000+ "turns" each. ccusage reported very high costs for the subagents pool, which seems disproportionate for simple side questions.
Observations
/btw creates files like agent-aside_question-*.jsonl in the subagents/ directory
- These files have
"isSidechain": true in their metadata
- They share the same
sessionId and timestamps as the parent conversation
- Every prior assistant message from the main conversation appears re-logged in these files with
cache_read_input_tokens
- ccusage sums up all these entries, which may be double-counting tokens already reported in the main session
Possible issue
If these sidechain logs are just mirroring the parent conversation's history (not separate API calls), then ccusage may need to either:
- Filter out / deduplicate
isSidechain: true entries
- Detect that
aside_question logs share the same session and timestamps as the parent
Or if these are real separate API calls, that would be good to know too — it would mean /btw is much more expensive than expected.
Environment
- Claude Code CLI
/btw is a recently added feature
Additional evidence from statusline
Claude Code's statusline tracks session cost in real-time via cost.total_cost_usd from the API response, independent of JSONL log parsing. After a /btw call, the statusline cost increased by ~$0.08, while ccusage reported ~$10.28 for the same call. Across three /btw tests in the same session, ccusage reported $6.67, $9.66, and $10.28 (growing linearly with conversation length), while the statusline showed a consistent ~$0.08 increase each time. This confirms the overcounting — ccusage is re-summing the entire conversation history logged in each sidechain file rather than counting only the incremental API cost.
Question
Claude Code's
/btwfeature createsaside_questionsidechain log files undersubagents/that appear to re-log the entire conversation history with full usage metadata. ccusage reports these as significant costs, but I'm not sure if these represent real API calls or just duplicate log entries of the same conversation.Has anyone else noticed this? Are the reported costs for
/btwaccurate, or is ccusage overcounting?What I'm seeing
In a session with ~135k context, a single
/btwquestion created a sidechain log with 60 "turns" and ccusage reported ~$6-7 for it — even though/btwis supposed to be a single one-shot question/answer.In a longer session (~700k context), multiple
/btwuses created sidechain logs with 1,000+ "turns" each. ccusage reported very high costs for the subagents pool, which seems disproportionate for simple side questions.Observations
/btwcreates files likeagent-aside_question-*.jsonlin thesubagents/directory"isSidechain": truein their metadatasessionIdand timestamps as the parent conversationcache_read_input_tokensPossible issue
If these sidechain logs are just mirroring the parent conversation's history (not separate API calls), then ccusage may need to either:
isSidechain: trueentriesaside_questionlogs share the same session and timestamps as the parentOr if these are real separate API calls, that would be good to know too — it would mean
/btwis much more expensive than expected.Environment
/btwis a recently added featureAdditional evidence from statusline
Claude Code's statusline tracks session cost in real-time via
cost.total_cost_usdfrom the API response, independent of JSONL log parsing. After a/btwcall, the statusline cost increased by ~$0.08, while ccusage reported ~$10.28 for the same call. Across three/btwtests in the same session, ccusage reported $6.67, $9.66, and $10.28 (growing linearly with conversation length), while the statusline showed a consistent ~$0.08 increase each time. This confirms the overcounting — ccusage is re-summing the entire conversation history logged in each sidechain file rather than counting only the incremental API cost.