[BUG] IS_DEMO env var suppresses workspace trust prompt without granting trust, breaking statusline and hooks
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_DEMOsuppresses the trust prompt again, preventing trust acceptance - The only fix is to remove
IS_DEMOfrom 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
- Add
IS_DEMO=1to env in~/.claude/settings.json:
``json``
{
"env": { "IS_DEMO": "1" },
"statusLine": { "type": "command", "command": "echo test" }
}
- Launch
claude --debugin any directory where workspace trust has not been previously accepted - Notice the workspace trust prompt does NOT appear
- Statusline shows
statusline skipped · restart to fix - Debug logs confirm:
Status line command skipped: workspace trust not accepted - Restart Claude Code — same result, trust prompt never shown
- Remove
IS_DEMOfrom 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" />
Showing cached comments. Read the full discussion on GitHub ↗
8 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
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.
FYI, I think you can hide your email by just having this env set instead:
CLAUDE_CODE_HIDE_ACCOUNT_INFO=1, no IS_DEMO neededUnfortunately CLAUDE_CODE_HIDE_ACCOUNT_INFO is not listed as a supported env-var anymore.
I see the behavior described by https://github.com/anthropics/claude-code/issues/37780#issuecomment-4294696234.
statusline skipped · restart to fixhappened to me usingIS_DEMO=1, after adding astatusLineto~/.claude/settings.json, with2.1.133 (Claude Code)on Linux.Then I exited
claude, rununset IS_DEMOin the terminal used to startclaude, and startedclaudeagain. I was forced to login. Then I exitedclaudeand restoredexport IS_DEMO=1in the shell, and startedclaudeagain. This time no morestatusline skipped · restart to fix.Maybe this is what is meant by restart?
This is still happening with 2.1.150.
CLAUDE_CODE_HIDE_ACCOUNT_INFOmay be undocumented but it works.Closing for now — inactive for too long. Please open a new issue if this is still relevant.
The problem is still present in
2.1.233 (Claude Code).