claude-code - 💡(How to fix) Fix [Bug] Claude Sonnet: Response quality degradation in iterative CLI workflows with poor context retention [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#55059Fetched 2026-05-01 05:47:18
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Error Message

[{"error":"Error: 1: Command failed with ERR_STREAM_PREMATURE_CLOSE: code --force --install-extension anthropic.claude-code\nPremature close \n at qcL (/$bunfs/root/src/entrypoints/cli.js:1717:4046)\n at async _cL (/$bunfs/root/src/entrypoints/cli.js:1717:1435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T15:59:18.354Z"},{"error":"McpToolCallError: Failed to initialize browser: browserType.launch: Executable doesn't exist at /Users/diegon/Library/Caches/ms-playwright/chromium-1200/chrome-mac-x64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing\n╔═════════════════════════════════════════════════════════════════════════╗\n║ Looks like Playwright Test or Playwright was just installed or updated. ║\n║ Please run the following command to download new browsers: ║\n║ ║\n║ npx playwright install ║\n║ ║\n║ <3 Playwright Team ║\n╚═════════════════════════════════════════════════════════════════════════╝. Please try again.\n at oB4 (/$bunfs/root/src/entrypoints/cli.js:4892:63)\n at lU1 (/$bunfs/root/src/entrypoints/cli.js:4892:1409)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T16:11:36.032Z"},{"error":"Error: Request was aborted.\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T16:18:28.194Z"}]

Code Example

[{"error":"Error: 1: Command failed with ERR_STREAM_PREMATURE_CLOSE: code --force --install-extension anthropic.claude-code\nPremature close \n    at qcL (/$bunfs/root/src/entrypoints/cli.js:1717:4046)\n    at async _cL (/$bunfs/root/src/entrypoints/cli.js:1717:1435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T15:59:18.354Z"},{"error":"McpToolCallError: Failed to initialize browser: browserType.launch: Executable doesn't exist at /Users/diegon/Library/Caches/ms-playwright/chromium-1200/chrome-mac-x64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing\n╔═════════════════════════════════════════════════════════════════════════╗\n║ Looks like Playwright Test or Playwright was just installed or updated. ║\n║ Please run the following command to download new browsers:              ║\n║                                                                         ║\n║     npx playwright install                                              ║\n║                                                                         ║\n║ <3 Playwright Team                                                      ║\n╚═════════════════════════════════════════════════════════════════════════╝. Please try again.\n    at oB4 (/$bunfs/root/src/entrypoints/cli.js:4892:63)\n    at lU1 (/$bunfs/root/src/entrypoints/cli.js:4892:1409)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T16:11:36.032Z"},{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T16:18:28.194Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description Claude Sonnet – Degradation Feedback (CLI Context)

Summary Over the past month, response quality has consistently degraded in CLI-based workflows. The model is increasingly unreliable for iterative tasks like debugging, refactoring, and commit fixing.

Key Issues

  1. Regression in Iterative Fixes

When asked to fix a commit or bug, each iteration often introduces new errors Fails to preserve previously correct logic Lacks stability across turns (no convergence)

  1. Poor Context Retention

Ignores constraints or instructions from earlier in the thread Reverts to generic solutions instead of respecting prior decisions Weak handling of long or evolving contexts

  1. Over-Correction / Destructive Edits

Instead of minimal diffs, it rewrites large sections unnecessarily Breaks working code while attempting to fix a small issue Doesn’t follow “surgical fix” behavior expected in CLI workflows

  1. Hallucinated Changes

Modifies unrelated parts of the codebase Introduces variables, logic, or assumptions not present in the original code Occasionally invents APIs or structures

  1. Declining Instruction Adherence

Ignores explicit instructions like: “Do not refactor” “Only fix this specific bug” “Keep structure unchanged” Tends to default to its own interpretation Expected Behavior (Not Met) Deterministic, minimal diffs for commit fixes Strong constraint adherence Stable multi-step debugging (progressively improving, not degrading) Clear reasoning tied to the actual code (not generic patterns) Impact Slows down development instead of accelerating it Requires manual rollback of model changes Reduces trust in CLI-based workflows Makes the model unusable for commit repair tasks

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.123
  • Feedback ID: dbadfd51-f467-4683-8724-7599925b51b4

Errors

[{"error":"Error: 1: Command failed with ERR_STREAM_PREMATURE_CLOSE: code --force --install-extension anthropic.claude-code\nPremature close \n    at qcL (/$bunfs/root/src/entrypoints/cli.js:1717:4046)\n    at async _cL (/$bunfs/root/src/entrypoints/cli.js:1717:1435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T15:59:18.354Z"},{"error":"McpToolCallError: Failed to initialize browser: browserType.launch: Executable doesn't exist at /Users/diegon/Library/Caches/ms-playwright/chromium-1200/chrome-mac-x64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing\n╔═════════════════════════════════════════════════════════════════════════╗\n║ Looks like Playwright Test or Playwright was just installed or updated. ║\n║ Please run the following command to download new browsers:              ║\n║                                                                         ║\n║     npx playwright install                                              ║\n║                                                                         ║\n║ <3 Playwright Team                                                      ║\n╚═════════════════════════════════════════════════════════════════════════╝. Please try again.\n    at oB4 (/$bunfs/root/src/entrypoints/cli.js:4892:63)\n    at lU1 (/$bunfs/root/src/entrypoints/cli.js:4892:1409)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T16:11:36.032Z"},{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-30T16:18:28.194Z"}]

extent analysis

TL;DR

The most likely fix involves addressing the errors related to premature closure, browser initialization, and request abortion, which may be resolved by updating dependencies, reinstalling browsers, or adjusting the CLI configuration.

Guidance

  • Verify the version of the anthropic.claude-code extension and consider updating it to the latest version.
  • Run the command npx playwright install to download new browsers, as suggested in the error message.
  • Check the network connection and server status to ensure that requests are not being aborted due to external factors.
  • Review the CLI configuration and entrypoints to identify potential issues with command execution and error handling.

Example

No specific code snippet is provided, as the issue seems to be related to configuration and dependency management rather than code-level errors.

Notes

The provided error messages suggest issues with dependency installation, browser initialization, and request handling. However, without more information about the specific use case and environment, it is difficult to provide a more targeted solution.

Recommendation

Apply the workaround by running npx playwright install and verifying the extension version, as this may resolve the browser initialization and request abortion errors.

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

claude-code - 💡(How to fix) Fix [Bug] Claude Sonnet: Response quality degradation in iterative CLI workflows with poor context retention [1 participants]