claude-code - 💡(How to fix) Fix insights: role attribution bug — Claude errors attributed to user in friction analysis [1 participants]

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…
GitHub stats
anthropics/claude-code#47911Fetched 2026-04-15 06:38:52
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

/insights generates a friction analysis that attributes assistant (Claude) behaviors to the user. When the user is the corrector (pushing back on overconfident Claude claims, catching protocol violations, forcing grounding), the analyzer reports the errors as user patterns: "You frequently claim tasks are complete..." — a direct quote from today's output describing Claude behavior, not mine.

The friction_analysis section blames the user for things the user actually fixed.

Root Cause

/insights generates a friction analysis that attributes assistant (Claude) behaviors to the user. When the user is the corrector (pushing back on overconfident Claude claims, catching protocol violations, forcing grounding), the analyzer reports the errors as user patterns: "You frequently claim tasks are complete..." — a direct quote from today's output describing Claude behavior, not mine.

The friction_analysis section blames the user for things the user actually fixed.

Fix Action

Fix / Workaround

  1. Report: "You claimed the brief evolution was complete but missed ADR triple persistence and pulse candidate routing, forcing the user to push back with 'faz agora nao confio que o milestone esteja 100%'" — this quote captures Claude claiming completion + me correcting. Attributed to me.
  2. Report: "You tried to implement inline instead of following the Rex protocol" — this is Claude attempting inline when my project's rules require agentic dispatch. I caught and corrected it. Attributed to me.
  3. Report: "You assumed Antigravity ran Gemini CLI (not Claude Code) and dismissed maestro-orchestrate without grounding" — Claude assumption, my correction. Attributed to me.

I run a heavily agentic/governance-first workflow (custom skills, hooks, multi-agent dispatch). My role in sessions is disproportionately the corrector/verifier. That makes this attribution bug especially visible in my transcripts, but it should affect any user with a strong verification style.

Code Example

When deriving friction patterns, attribute behaviors by message role:
- role=user messages → user patterns (friction with the tool/workflow)
- role=assistant messages → assistant patterns (Claude's own errors/slowdowns)
- If a user message is a correction of an assistant behavior, the behavior itself belongs to the assistant, not the user.
Do not summarize assistant errors as user friction.
RAW_BUFFERClick to expand / collapse

Summary

/insights generates a friction analysis that attributes assistant (Claude) behaviors to the user. When the user is the corrector (pushing back on overconfident Claude claims, catching protocol violations, forcing grounding), the analyzer reports the errors as user patterns: "You frequently claim tasks are complete..." — a direct quote from today's output describing Claude behavior, not mine.

The friction_analysis section blames the user for things the user actually fixed.

Expected vs actual

Expected: friction categories derived from role=user message patterns only. Claude's confirmed mistakes (visible in role=assistant text, often followed by user corrections) should either (a) attribute to the assistant explicitly, or (b) be excluded from the user's friction analysis.

Actual: the analyzer collapses role boundaries. My corrections of Claude errors appear in the report as my patterns. Concrete examples from today's output:

  1. Report: "You claimed the brief evolution was complete but missed ADR triple persistence and pulse candidate routing, forcing the user to push back with 'faz agora nao confio que o milestone esteja 100%'" — this quote captures Claude claiming completion + me correcting. Attributed to me.
  2. Report: "You tried to implement inline instead of following the Rex protocol" — this is Claude attempting inline when my project's rules require agentic dispatch. I caught and corrected it. Attributed to me.
  3. Report: "You assumed Antigravity ran Gemini CLI (not Claude Code) and dismissed maestro-orchestrate without grounding" — Claude assumption, my correction. Attributed to me.

All three 'friction categories' listed in my report describe assistant behavior, not mine.

Impact

  • Users lose signal from /insights — the most interesting failure-mode analysis is misaddressed.
  • For users who act as quality gates (heavy verifier style), the report can suggest they are the weak link when the opposite is true.
  • Downstream use (personal review, team sharing, self-reflection) is misleading.

Steps to reproduce

  1. Start a session where Claude repeatedly over-claims completion or skips protocols.
  2. Push back each time with corrections (require evidence, force re-verification).
  3. Run /insights after 5-10 such interactions.
  4. Observe: friction categories describe the Claude behavior you corrected, attributed to you.

Suggested fix

In the analyzer prompt (the LLM that synthesizes friction patterns from transcripts), add an explicit role-attribution rule:

When deriving friction patterns, attribute behaviors by message role:
- role=user messages → user patterns (friction with the tool/workflow)
- role=assistant messages → assistant patterns (Claude's own errors/slowdowns)
- If a user message is a correction of an assistant behavior, the behavior itself belongs to the assistant, not the user.
Do not summarize assistant errors as user friction.

Optional richer fix: surface a separate "Claude's friction patterns" section that mirrors the existing user friction section, so users can see both sides of the interaction honestly.

Environment

  • Claude Code: interactive CLI (Max 20x subscription, WSL2 Ubuntu)
  • Report generated: 2026-04-14
  • Session count analyzed: 118 (30 days)

Meta note

I run a heavily agentic/governance-first workflow (custom skills, hooks, multi-agent dispatch). My role in sessions is disproportionately the corrector/verifier. That makes this attribution bug especially visible in my transcripts, but it should affect any user with a strong verification style.

extent analysis

TL;DR

The most likely fix is to update the analyzer prompt to include an explicit role-attribution rule, distinguishing between user and assistant behaviors in the friction analysis.

Guidance

  • Review the analyzer prompt to ensure it correctly attributes behaviors to the user or assistant based on message roles.
  • Verify that the prompt handles user corrections of assistant behaviors by attributing the behavior to the assistant, not the user.
  • Consider adding a separate section to the report to surface "Claude's friction patterns" for transparency and honest interaction analysis.
  • Test the updated analyzer prompt with various scenarios, including those where the user corrects assistant errors, to ensure accurate attribution.

Example

# Updated analyzer prompt
When deriving friction patterns:
- Attribute user messages to user patterns
- Attribute assistant messages to assistant patterns
- If a user message corrects an assistant behavior, attribute the behavior to the assistant

Notes

The suggested fix relies on the assumption that the analyzer prompt can be updated to include the proposed role-attribution rule. The effectiveness of this fix may depend on the specific implementation and the complexity of the interaction transcripts.

Recommendation

Apply the workaround by updating the analyzer prompt with the explicit role-attribution rule, as this should address the root cause of the issue and provide more accurate friction analysis.

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