[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" />
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗