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

Resolved 💬 7 comments Opened Mar 23, 2026 by petersolopov 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 ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗