claude-code - 💡(How to fix) Fix Claude code repeating results multiple times without being prompted to do so. [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#52076Fetched 2026-04-23 07:37:12
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

At the end of a Claude Code run the final summary of the run repeats itself multiple times. I've attached a sample of 2 repeats. It had actually repeated 10 times in this instance

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

  ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ⏵⏵ bypass permissions on (shift+tab to cycle) cachedir: .pytest_cache … +10 lines (ctrl+o to expand)

● 4/4 green. Now run against the live factstore to verify the real export works end to end.

● Bash(cd E:/AW && python tools/export/export.py run data/factstores/LRC_15.factstore.db --output data/factstores/lrc15.kb.json 2>&1) ⎿  export run v0.1 output: data\factstores\lrc15.kb.json

● Bash(cd E:/AW && python -c " import json, hashlib…) ⎿  top-level keys: ['acr', 'tables', 'xmp_meta', 'xmp_namespaces', 'xmp_properties'] target: {'app': None, 'slug': 'lrc15', 'version': None} audit: {'citation_count': 67, 'conflicted_count': 0, 'dead_citation_count': 0, 'fact_count': 4053, 'ground_truth_coverage_pct': 99.6, 'per_category_scores': {}} … +3 lines (ctrl+o to expand)

● Round-trip clean: 4053 fact_keys in → 4053 in tree, 67 citations exported. Now verify full test suite is still green.

● Bash(cd E:/AW && python -m pytest tools/reconciler/tests/ tools/export/tests/ -v 2>&1 | tail -20) ⎿  tools/reconciler/tests/test_reconciler.py::test_tier_filter_includes_authoritative_null_tier PASSED [ 34%] tools/reconciler/tests/test_reconciler.py::test_tier_filter_excludes_null_harvest_tier PASSED [ 38%] tools/reconciler/tests/test_reconciler.py::test_gt_override_wins_regardless_of_harvest PASSED [ 42%] … +17 lines (ctrl+o to expand)

● 26/26 green. Let me commit.

● Bash(cd E:/AW && git status) ⎿  On branch main Your branch is ahead of 'origin/main' by 5 commits. (use "git push" to publish your local commits) … +47 lines (ctrl+o to expand)

● Bash(cd E:/AW && git add tools/export/ schemas/kb_export.schema.json data/factstores/lrc15.kb.json && git commit -m "$(cat <<'EOF' [AW-KB-P1.20a] export.py v0.1 + sc…) ⎿  warning: in the working copy of 'schemas/kb_export.schema.json', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'tools/export/export.py', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'tools/export/tests/test_export.py', LF will be replaced by CRLF the next time Git touches it … +8 lines (ctrl+o to expand)

● Done. export.py v0.1 is committed.

What was built:

┌───────────────────────────────────┬──────┬───────────────────────────────────────────────────────────┐ │ File │ LOC │ Purpose │ ├───────────────────────────────────┼──────┼───────────────────────────────────────────────────────────┤ │ tools/export/export.py │ ~220 │ Reads reconciled_facts + citations, writes <slug>.kb.json │ ├───────────────────────────────────┼──────┼───────────────────────────────────────────────────────────┤ │ schemas/kb_export.schema.json │ ~60 │ JSON Schema for output validation │ ├───────────────────────────────────┼──────┼───────────────────────────────────────────────────────────┤ │ tools/export/tests/test_export.py │ ~130 │ 4 tests per §13.4 │ └───────────────────────────────────┴──────┴───────────────────────────────────────────────────────────┘

Live run result: data/factstores/lrc15.kb.json — 4053 fact_keys across tables, xmp_properties, xmp_namespaces, xmp_meta, acr; 67 citations; 0 conflicts; 99.6% GT coverage.

Tests: 26/26 green (22 reconciler + 4 export).

Next step would be P1.20b (human_viewer.py) or the reconciler v0.2 polish (§8.3 citation graph).

✻ Brewed for 7m 54s

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

  ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ⏵⏵ bypass permissions on (shift+tab to cycle) platform win32 -- Python 3.13.12, pytest-9.0.3, pluggy-1.6.0 -- C:\Users\SteveB\AppData\Local\Programs\Python\Python313\python.exe cachedir: .pytest_cache … +10 lines (ctrl+o to expand)

● 4/4 green. Now run against the live factstore to verify the real export works end to end.

● Bash(cd E:/AW && python tools/export/export.py run data/factstores/LRC_15.factstore.db --output data/factstores/lrc15.kb.json 2>&1) ⎿  export run v0.1 output: data\factstores\lrc15.kb.json

● Bash(cd E:/AW && python -c " import json, hashlib…) ⎿  top-level keys: ['acr', 'tables', 'xmp_meta', 'xmp_namespaces', 'xmp_properties'] target: {'app': None, 'slug': 'lrc15', 'version': None} audit: {'citation_count': 67, 'conflicted_count': 0, 'dead_citation_count': 0, 'fact_count': 4053, 'ground_truth_coverage_pct': 99.6, 'per_category_scores': {}} … +3 lines (ctrl+o to expand)

● Round-trip clean: 4053 fact_keys in → 4053 in tree, 67 citations exported. Now verify full test suite is still green.

● Bash(cd E:/AW && python -m pytest tools/reconciler/tests/ tools/export/tests/ -v 2>&1 | tail -20) ⎿  tools/reconciler/tests/test_reconciler.py::test_tier_filter_includes_authoritative_null_tier PASSED [ 34%] tools/reconciler/tests/test_reconciler.py::test_tier_filter_excludes_null_harvest_tier PASSED [ 38%] tools/reconciler/tests/test_reconciler.py::test_gt_override_wins_regardless_of_harvest PASSED [ 42%] … +17 lines (ctrl+o to expand)

● 26/26 green. Let me commit.

● Bash(cd E:/AW && git status) ⎿  On branch main Your branch is ahead of 'origin/main' by 5 commits. (use "git push" to publish your local commits) … +47 lines (ctrl+o to expand)

● Bash(cd E:/AW && git add tools/export/ schemas/kb_export.schema.json data/factstores/lrc15.kb.json && git commit -m "$(cat <<'EOF' [AW-KB-P1.20a] export.py v0.1 + sc…) ⎿  warning: in the working copy of 'schemas/kb_export.schema.json', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'tools/export/export.py', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'tools/export/tests/test_export.py', LF will be replaced by CRLF the next time Git touches it … +8 lines (ctrl+o to expand)

● Done. export.py v0.1 is committed.

What was built:

┌───────────────────────────────────┬──────┬───────────────────────────────────────────────────────────┐ │ File │ LOC │ Purpose │ ├───────────────────────────────────┼──────┼───────────────────────────────────────────────────────────┤ │ tools/export/export.py │ ~220 │ Reads reconciled_facts + citations, writes <slug>.kb.json │ ├───────────────────────────────────┼──────┼───────────────────────────────────────────────────────────┤ │ schemas/kb_export.schema.json │ ~60 │ JSON Schema for output validation │ ├───────────────────────────────────┼──────┼───────────────────────────────────────────────────────────┤ │ tools/export/tests/test_export.py │ ~130 │ 4 tests per §13.4 │ └───────────────────────────────────┴──────┴───────────────────────────────────────────────────────────┘

Live run result: data/factstores/lrc15.kb.json — 4053 fact_keys across tables, xmp_properties, xmp_namespaces, xmp_meta, acr; 67 citations; 0 conflicts; 99.6% GT coverage.

Tests: 26/26 green (22 reconciler + 4 export).

Next step would be P1.20b (human_viewer.py) or the reconciler v0.2 polish (§8.3 citation graph).

✻ Brewed for 7m 54s

What Should Happen?

Claude code should only show 1 summary

Error Messages/Logs

Steps to Reproduce

Run a claude code task.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude Code v2.1.117

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

extent analysis

TL;DR

The issue can be resolved by investigating and fixing the logic that generates the final summary of the Claude Code run, ensuring it only prints once.

Guidance

  • Review the code responsible for generating the final summary to identify any loops or recursive calls that might cause the repetition.
  • Check the logging or output mechanisms used in the Claude Code to see if there's an option to suppress or limit the output of the summary.
  • Investigate if there are any configuration options or environment variables that could be influencing the behavior of the summary generation.
  • Consider adding a unique identifier or a counter to the summary output to help diagnose how many times the summary is being generated.

Example

No specific code example can be provided without access to the Claude Code's source code, but the investigation should focus on the parts of the code responsible for the final summary output.

Notes

The exact cause of the issue cannot be determined without more information about the internal workings of the Claude Code or access to its source code. The steps provided are general guidance towards troubleshooting and potentially fixing the issue.

Recommendation

Apply a workaround by manually editing the output or logging configuration if possible, to limit the repetition of the summary until a permanent fix can be implemented in the Claude Code itself.

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