[BUG] Config accessed before allowed

Status Fixed / completed
Maintainer reply None cached
Activity 13 comments · opened May 28, 2025 · closed Jun 3, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • 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

View original on GitHub ↗

13 Comments

f1sherman · 1 year ago

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

marcinja · 1 year ago

Getting the same error.

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

erikhansen · 1 year ago

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).

davegildea · 1 year ago

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

erikhansen · 1 year ago

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

Arhmagos-Michael-BasaroS · 1 year ago

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

hboon · 1 year ago

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

Arhmagos-Michael-BasaroS · 1 year ago

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

Upd: issue still persists .

f1sherman · 1 year ago

I'm still seeing this error on version 1.0.6.

marcinja · 1 year ago

Seems to be fixed for me with 1.0.9

f1sherman · 1 year ago

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

azhang · 1 year ago
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

github-actions[bot] · 1 year ago

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.