claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Config accessed before allowed

Open f1sherman opened this issue 7 months ago • 9 comments

Environment

  • Platform (select one):
    • [x] Anthropic API
    • [ ] AWS Bedrock
    • [ ] Google Vertex AI
    • [ ] Other:
  • Claude CLI version: 1.0.4
  • Operating System: macOS 15.5
  • Terminal: iTerm2

Bug Description

When I start Claude Code, I get the following stack trace. Everything that I type in the editor gets the response Interrupted by user.

 ❯ claude                                                                                [14:38:52]
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: Config accessed before allowed.
    at iP (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:644:13774)
    at WA (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:644:13289)
    at TT (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:644:15394)
    at file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:532:36081
    at Q (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:532:16887)
    at v31 (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:572:18142)
    at g1 (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:573:3247)
    at i5 (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:563:10000)
    at jm9 (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:568:307)
    at BI (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:568:1006)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: Config accessed before allowed.
    at iP (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:644:13774)
    at WA (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:644:13289)
    at TT (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:644:15394)
    at file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:532:36081
    at Q (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:532:16887)
    at v31 (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:572:18142)
    at g1 (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:573:3247)
    at i5 (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:563:10000)
    at jm9 (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:568:307)
    at BI (file:///Users/brianjohn/.nodenv/versions/20.19.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:568:1006)
╭─────────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code!                           │
│                                                     │
│   /help for help, /status for your current setup    │
│                                                     │
│   cwd: /Users/brianjohn/projects/betterup-monolith  │
╰─────────────────────────────────────────────────────╯


> hello?
  ⎿  Interrupted by user

Steps to Reproduce

  1. Start Claude

Expected Behavior

No errors and Claude responds to queries

Actual Behavior

Errors and Claude does not respond to queries

f1sherman avatar May 28 '25 19:05 f1sherman

I downgraded to Claude Code 1.0.3 and it's working fine, appears to be something with the latest version 1.0.4.

f1sherman avatar May 28 '25 19:05 f1sherman

Getting the same error.

In case anyone else has this issue, to downgrade and stay downgraded: npm install -g @anthropic-ai/[email protected] claude config set -g autoUpdaterStatus disabled

marcinja avatar May 28 '25 19:05 marcinja

I too am getting this error, starting only today on version 1.0.4.

The problem is, I allowed Claude to move itself into ~/.claude/local/claude so I can't easily downgrade using npm (per @marcinja's suggestion).

erikhansen avatar May 28 '25 22:05 erikhansen

Having this error when I make any changes to the config, in my case I am working using Bedrock

davegildea avatar May 29 '25 13:05 davegildea

For what it's worth, renaming my ~/.claude/settings.json to ~/.claude/DISABLEDsettings.json allowed me to bypass this issue.

erikhansen avatar May 29 '25 16:05 erikhansen

Same here , but for 1.0.6 . I've downgraded for 1.0.3 , but Claude Code instantly re-updated to 1.0.6 .

@Arhmagos-Michael-BasaroS claude config set -g autoUpdaterStatus disabled

hboon avatar May 30 '25 00:05 hboon

Seems that issue fixed , I am on v1.0.6 and today launched Claude Code without errors .

Upd: issue still persists .

I'm still seeing this error on version 1.0.6.

f1sherman avatar Jun 02 '25 15:06 f1sherman

Seems to be fixed for me with 1.0.9

marcinja avatar Jun 03 '25 14:06 marcinja

Yep working for me on 1.0.9 as well. Going to close this out.

f1sherman avatar Jun 03 '25 15:06 f1sherman

I too am getting this error, starting only today on version 1.0.4.

The problem is, I allowed Claude to move itself into ~/.claude/local/claude so I can't easily downgrade using npm (per @marcinja's suggestion).

cd ~/.claude/local && npm update @anthropic-ai/claude-code

azhang avatar Jun 04 '25 00:06 azhang

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 13 '25 14:08 github-actions[bot]