[BUG] IS_DEMO env var suppresses workspace trust prompt without granting trust, breaking statusline and hooks

Status Closed — not planned
Reported on v2.1.81
Maintainer reply None cached
Activity 9 comments · opened Mar 23, 2026 · closed Jun 26, 2026

Preflight Checklist

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

What's Wrong?

Setting IS_DEMO=1 in the env section of ~/.claude/settings.json suppresses the workspace trust prompt ("Do you trust the files in this folder?") but does not implicitly grant workspace trust. This puts features requiring workspace trust (such as custom statusLine, hooks, and plugins) into a permanently broken state:

  • The statusline shows statusline skipped · restart to fix
  • Restarting does not help because IS_DEMO suppresses the trust prompt again, preventing trust acceptance
  • The only fix is to remove IS_DEMO from settings, restart, and manually accept the trust prompt

This is the same pattern as #10409, where --dangerously-skip-permissions skipped the trust check without granting trust. That issue was fixed, but IS_DEMO has the same problem.

What Should Happen?

The "statusline skipped · restart to fix" message should explain the actual cause (workspace trust not accepted) instead of suggesting a restart that won't help

Error Messages/Logs

2026-03-23T10:31:12.957Z [DEBUG] Skipping SessionStart:startup hook execution - workspace trust not accepted
2026-03-23T10:31:12.992Z [WARN] Status line command skipped: workspace trust not accepted
2026-03-23T10:31:12.992Z [DEBUG] Skipping StatusLine command execution - workspace trust not accepted
2026-03-23T10:31:12.995Z [DEBUG] Trust not accepted for current directory - skipping plugin installations
2026-03-23T10:31:20.410Z [DEBUG] Skipping SessionEnd:prompt_input_exit hook execution - workspace trust not accepted

Steps to Reproduce

  1. Add IS_DEMO=1 to env in ~/.claude/settings.json:

``json
{
"env": { "IS_DEMO": "1" },
"statusLine": { "type": "command", "command": "echo test" }
}
``

  1. Launch claude --debug in any directory where workspace trust has not been previously accepted
  2. Notice the workspace trust prompt does NOT appear
  3. Statusline shows statusline skipped · restart to fix
  4. Debug logs confirm: Status line command skipped: workspace trust not accepted
  5. Restart Claude Code — same result, trust prompt never shown
  6. Remove IS_DEMO from settings → restart → trust prompt appears → accept → statusline works

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.81

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

<img width="960" height="104" alt="Image" src="https://github.com/user-attachments/assets/058ac07a-d8a1-4a65-bdae-c1cdc84e262b" />

View original on GitHub ↗

8 Comments

github-actions[bot] · 5 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/34608
  2. https://github.com/anthropics/claude-code/issues/10409

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

iamFIREcracker · 4 months ago

Bumped into this today.

I have IS_DEMO in my startup script to hide my email.

I launched claude from a new project directory, and since the workspace trust workflow did not kick in, because it's gated behind IS_DEMO, then my statusline script could not run -- instead I was presented with the "statusline skipped · restart to fix" error message.

The solution was to start claude without IS_DEMO, trust the workspace, and then carry on as usual, but it's a little bit annoying to do, everytime I launch claude from a new project directory.

TheBoroer · 4 months ago
I have IS_DEMO in my startup script to hide my email.

FYI, I think you can hide your email by just having this env set instead: CLAUDE_CODE_HIDE_ACCOUNT_INFO=1, no IS_DEMO needed

iamFIREcracker · 4 months ago

Unfortunately CLAUDE_CODE_HIDE_ACCOUNT_INFO is not listed as a supported env-var anymore.

marcindulak · 3 months ago

I see the behavior described by https://github.com/anthropics/claude-code/issues/37780#issuecomment-4294696234.

statusline skipped · restart to fix happened to me using IS_DEMO=1, after adding a statusLine to ~/.claude/settings.json, with 2.1.133 (Claude Code) on Linux.

Then I exited claude, run unset IS_DEMO in the terminal used to start claude, and started claude again. I was forced to login. Then I exited claude and restored export IS_DEMO=1 in the shell, and started claude again. This time no more statusline skipped · restart to fix .

Maybe this is what is meant by restart?

rodboev · 3 months ago

This is still happening with 2.1.150. CLAUDE_CODE_HIDE_ACCOUNT_INFO may be undocumented but it works.

github-actions[bot] · 2 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

marcindulak · 13 days ago

The problem is still present in 2.1.233 (Claude Code).

Showing cached comments. Read the full discussion on GitHub ↗