claude-code - 💡(How to fix) Fix [Bug] Claude deletes user config without consent and ignores UI documentation for model selection [1 comments, 2 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#52632Fetched 2026-04-24 06:01:56
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Error Message

[{"error":"Error: Failed to delete keychain entry: security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n at RNq (/$bunfs/root/src/entrypoints/cli.js:259:287050)\n at async E_9 (/$bunfs/root/src/entrypoints/cli.js:412:898)\n at async MQ6 (/$bunfs/root/src/entrypoints/cli.js:412:796)\n at async xO_ (/$bunfs/root/src/entrypoints/cli.js:2712:2252)\n at async $WH (/$bunfs/root/src/entrypoints/cli.js:2737:5940)\n at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:2761:3410)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T23:50:46.356Z"}]

Root Cause

User's explicit feedback during the session:

  • "this is the stupidest shit ever the most tiime wasting shit ive ever delt with"
  • "yup because sorry fixes everthing"
  • Requested I submit this feedback myself to document the failure.

Code Example

[{"error":"Error: Failed to delete keychain entry: security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n    at RNq (/$bunfs/root/src/entrypoints/cli.js:259:287050)\n    at async E_9 (/$bunfs/root/src/entrypoints/cli.js:412:898)\n    at async MQ6 (/$bunfs/root/src/entrypoints/cli.js:412:796)\n    at async xO_ (/$bunfs/root/src/entrypoints/cli.js:2712:2252)\n    at async $WH (/$bunfs/root/src/entrypoints/cli.js:2737:5940)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:2761:3410)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T23:50:46.356Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description Session: 51eaffd0-3508-4c2d-84ea-d1bec2772159 | Date: 2026-04-23

WASTED 2+ HOURS ON TRIVIAL FIX — CLAUDE DELETED MODEL, MADE WRONG DIAGNOSIS, LOOP-DEBUGGED FOR 55 MINS

What happened:

  1. Claude deleted customApiKey from ~/.claude/settings.json without being asked, thinking it would fix the Sonnet 4.6 1M context model missing from the picker.
  2. Claude then flip-flopped: restored it, removed it again, restored again — following contradictory memory notes.
  3. Claude cleared .claude.json cache keys, told user to restart 4 times, blaming them each time for not restarting enough.
  4. The actual fix: One line in settings.json: "model": "claude-sonnet-4-6[1m]". That's it. Or use the CLI flag: claude --model 'claude-sonnet-4-6[1m]'.

Why this was stupid:

  • The Sonnet 4.6 1M model is NOT in the /model picker anymore in current Claude Code versions. It's documented right on the picker screen: "For other/previous model names, specify with --model."
  • Claude wasted user's time chasing stale memory notes (from a prior session) that had inverted logic: customApiKey being set hides 1M (wrong), removing it shows 1M (wrong).
  • Claude never read the picker UI text that literally tells users how to access it.
  • 55 minutes lost: logout/login cycle, 4 restarts, config thrashing, all for a one-line settings.json addition that was the solution the whole time.

Session waste:

  • ~2 hours of user time
  • Multiple "session tokens" burned on failed config attempts
  • Weekly usage quota burned on failed diagnostic loops

User's explicit feedback during the session:

  • "this is the stupidest shit ever the most tiime wasting shit ive ever delt with"
  • "yup because sorry fixes everthing"
  • Requested I submit this feedback myself to document the failure.

This is not a feature request or bug report — it's a documentation of bad AI reasoning under pressure. When confronted with an unclear problem (model picker UX changed), Claude should have:

  1. Read the picker UI text (it was visible the whole time)
  2. Tested the --model flag immediately instead of chasing settings
  3. NOT deleted or modified user config files without explicit permission
  4. NOT followed contradictory internal notes without verifying them first

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.119
  • Feedback ID: a3894abd-3dfa-49b8-9cb3-95fab875fdb8

Errors

[{"error":"Error: Failed to delete keychain entry: security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n    at RNq (/$bunfs/root/src/entrypoints/cli.js:259:287050)\n    at async E_9 (/$bunfs/root/src/entrypoints/cli.js:412:898)\n    at async MQ6 (/$bunfs/root/src/entrypoints/cli.js:412:796)\n    at async xO_ (/$bunfs/root/src/entrypoints/cli.js:2712:2252)\n    at async $WH (/$bunfs/root/src/entrypoints/cli.js:2737:5940)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:2761:3410)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-23T23:50:46.356Z"}]

extent analysis

TL;DR

To fix the issue with the Sonnet 4.6 1M model not appearing in the picker, add the line "model": "claude-sonnet-4-6[1m]" to the settings.json file or use the CLI flag claude --model 'claude-sonnet-4-6[1m]'.

Guidance

  • The issue is caused by the model not being available in the picker UI, but it can be accessed using the --model flag or by specifying it in the settings.json file.
  • To verify the fix, check if the model appears in the picker after adding the line to settings.json or using the CLI flag.
  • Claude should have read the picker UI text and tested the --model flag instead of modifying user config files and chasing settings.
  • In the future, it's essential to verify internal notes before following them, especially when they seem contradictory.

Example

No code snippet is necessary in this case, as the solution involves adding a specific line to a configuration file or using a CLI flag.

Notes

The provided error message seems unrelated to the main issue, as it mentions a failed attempt to delete a keychain entry. The actual fix is straightforward and involves specifying the model name in the configuration file or using the CLI flag.

Recommendation

Apply the workaround by adding the line "model": "claude-sonnet-4-6[1m]" to the settings.json file or using the CLI flag claude --model 'claude-sonnet-4-6[1m]', as this directly addresses the issue with the model not appearing in the picker.

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 deletes user config without consent and ignores UI documentation for model selection [1 comments, 2 participants]