Claude Code Hooks Missing in Demo Mode? Restore Workspace Trust

Claude Code Hooks Missing in Demo Mode? Restore Workspace Trust

Todd Mercer

A vivid veil lifts from a dark threshold as two grounded forms reconnect across a luminous opening.

Claude Code Hooks Missing in Demo Mode? Restore Workspace Trust

If Claude Code hooks, the status line, project permissions, and plugins all stop working in a new repository while IS_DEMO is enabled, check workspace trust before editing every hook. A current Claude Code bug can skip the trust prompt without granting trust. Remove IS_DEMO temporarily, start one interactive session in the repository, review and accept the trust prompt only if you trust the codebase, then verify the hooks through Claude Code's own dispatch path.

This guide is for developers who use demo mode to hide account details while streaming or recording. It applies when debug output says workspace trust not accepted. It does not cover a hook that launches and exits with an error, a bad matcher, or a malformed settings file.

Match the exact failure

The failure requires this combination:

  1. IS_DEMO is set in the shell or the env block of Claude Code settings.

  2. The current repository has not been trusted yet.

  3. The expected trust prompt never appears.

  4. Hooks and other trust-dependent configuration are skipped.

The current Claude Code environment-variable reference describes IS_DEMO as a way to hide the email and organization name and skip onboarding. Anthropic's security documentation separately says first-time codebases and new MCP servers require trust verification. The bug is the gap between those behaviors: demo mode can suppress the prompt while the workspace remains untrusted.

Use the symptom table to keep nearby failures separate:

What you observe

Likely boundary

Next check

Debug log says workspace trust not accepted for several events

Trust prompt was skipped or declined

Follow this guide

/hooks omits one definition

Settings source, schema, or matcher

Use Claude Code's configuration diagnostics

Hook launches and exits 127

Command path or runtime dependency

Use the hook exit 127 guide

Project MCP server says Pending approval

MCP server approval

Review the server from /mcp

Do not assume that a healthy-looking /doctor result proves hooks ran in this repository. The current issue report reproduced skipped hooks while the diagnostic summarized executions from other projects.

Capture a non-destructive baseline

From the affected repository, record the version and whether demo mode is present without printing secrets:

claude --version
test -n "${IS_DEMO:-}" && printf 'IS_DEMO is set\n' || printf 'IS_DEMO is unset\n'

Then start a separate diagnostic session with a log file you control:

CLAUDE_CODE_DEBUG_LOG_LEVEL=verbose \
  claude --debug-file /tmp/claude-trust-debug.log

Send one harmless prompt, exit the session, and inspect only the relevant lines:

grep -E 'workspace trust not accepted|Skipping .* hook|Status line command skipped' \
  /tmp/claude-trust-debug.log

Expected result on the affected path: the log ties skipped hook events, the status line, or plugin installation to unaccepted workspace trust. Redact repository paths, prompt text, tokens, and customer data before sharing the log.

If those lines are absent, stop. Run /hooks and follow Anthropic's configuration debugging guide instead of changing trust state without evidence.

Restore the missing trust decision

First locate the source that sets IS_DEMO. It may be exported by your shell or defined in a user, project, or managed settings file. Do not dump the entire environment or settings file into an issue.

For a user settings entry, make a private backup and remove only the IS_DEMO key from the env object. Do not replace it with the strings 0 or false as a workaround. The reproduced bug treats a non-empty value as enabled.

For a shell export, unset it in the terminal that will launch the recovery session:

unset IS_DEMO

Now launch Claude Code interactively from the exact repository:

cd /path/to/repository
claude

Read the trust prompt. Accept it only when you recognize and trust the repository, its project settings, hooks, MCP configuration, and added directories. If the repository is unfamiliar or its configuration has changed unexpectedly, choose No, exit and review the files outside Claude Code first.

Do not edit ~/.claude.json to manufacture a trust record. The supported recovery is to restore the prompt and make the decision interactively. Anthropic's worktree documentation uses the same boundary: accept workspace trust in the original directory before starting a worktree session.

Prove the hooks actually dispatch

After accepting trust, start another diagnostic session:

CLAUDE_CODE_DEBUG_LOG_LEVEL=verbose \
  claude --debug-file /tmp/claude-trust-verified.log

Use /hooks to confirm the expected event and matcher are registered. Trigger one safe fixture that should be allowed and one harmless fixture that your guardrail should block. Inspect the log for matching hook evaluation and its exit status.

The verification is complete only when:

  • the new log has no workspace trust not accepted skip for the tested event;

  • /hooks shows the definition from the expected settings source;

  • the allowed fixture completes;

  • the blocked fixture is denied for the reason your hook returns; and

  • unrelated tools are unaffected.

Testing the hook script directly is not enough. A script can pass its own unit tests while Claude Code never dispatches it.

Decide how to use demo mode afterward

Once the repository has a valid trust decision, you may restore IS_DEMO for a recording session and repeat the two fixtures. Current reports indicate that an already trusted repository keeps working, but a newly initialized repository can enter the silent skip path again.

Until Anthropic ships and documents a fix:

  • prefer a session-scoped IS_DEMO=1 claude launch after trust is established;

  • avoid a permanent global IS_DEMO setting if you frequently create repositories;

  • repeat the trust and hook canary for every new Git root;

  • keep destructive-action protection in CI, branch rules, or managed policy as well as local hooks; and

  • never treat demo mode as a security control.

The current issue 92911 reproduced the behavior on Claude Code 2.1.260 through 2.1.263 and cites earlier reports. The older issue 37780 contains the same debug signature and recovery on 2.1.81. Issue 37780 was closed as stale, not as a verified product fix. No fixed release was established when this article was prepared.

Keep external-action checks independent

A local Claude Code hook and an integration execution boundary solve different problems. The hook can stop or annotate a tool call inside the client. Aident Loadout can expose the current Action schema, connected-account boundary, and cost estimate before a provider call. Neither replaces workspace trust, and neither proves the other one ran.

After restoring hooks, use a read-only issue lookup to verify the two boundaries separately:

aident account auth status
aident vault vault --action status
aident capabilities search \
  --query 'get one GitHub issue by repository owner repo and issue number' \
  --targetEnv staging
aident capabilities get \
  --name composio:github_tools:github_get_an_issue
aident capabilities preflight \
  --name composio:github_tools:github_get_an_issue \
  --input '{"owner":"anthropics","repo":"claude-code","issue_number":92911}'

Expected result: the Action is discovered instead of guessed, its required inputs are visible, the connected GitHub account is explicit, and preflight validates the exact input before execution. The preflight checked for this guide reported an exact zero-credit estimate. Stop before execute if you only need to review the boundary.

Continue with Agent Skills vs MCP vs CLI when you need to decide which agent extension surface should own an integration job. If your trust log is clean but the hook command cannot launch, switch to Claude Code Hook Exit 127 rather than repeating the trust flow.

Inspect a managed Action safely with Aident Loadout.

Verification checklist

Before relying on the guardrail again, confirm:

  1. Did the debug log identify unaccepted workspace trust as the skip reason?

  2. Did you remove or unset IS_DEMO instead of assigning another non-empty value?

  3. Did you review and accept trust interactively in the exact repository?

  4. Does /hooks show the expected source, event, and matcher?

  5. Did an allowed fixture pass and a blocked fixture stop through Claude Code?

  6. Did you keep secrets and sensitive repository data out of logs?

  7. Do CI or managed controls still protect actions that must never depend on one local hook?

  8. Will you repeat the canary for the next new Git root?

Sources and refresh trigger

Refresh this guide when Anthropic closes issue 92911 with a verified release, changes the IS_DEMO contract, adds workspace trust to /doctor, or changes which settings and extension surfaces require trust.

About the author

Illustrated editorial avatar of Todd Mercer

Todd Mercer

Todd Mercer is an editorial pen name used by Aident's developer-tools team. This column covers agent CLI configuration, MCP connectivity, authentication, permissions, and troubleshooting. Guides focus on observable symptoms, documented fixes, reproducible checks where available, and the limits of each workaround.

Home

Home

Home

Integrations

Integrations

Integrations

Vault

Vault

Vault

Audit

Audit

Audit

Arana Grande

Arana Grande

Arana Grande

Free

Free

Free

30-day audit summary

30-day audit summary

30-day audit summary

Daily action-call volume and the latest receipts from the Loadout audit trail.

Daily action-call volume and the latest receipts from the Loadout audit trail.

Daily action-call volume and the latest receipts from the Loadout audit trail.

View Audit

View Audit

View Audit

Loadout usage

Loadout usage

Loadout usage

617 action calls in the last 30 days

617 action calls in the last 30 days

617 action calls in the last 30 days

May 19 - Jun 17

May 19 - Jun 17

May 19 - Jun 17

10 active days

10 active days

10 active days

Less

Less

Less

More

More

More

Recent activity

Recent activity

Recent activity

Latest action-call receipts from connected agents

Latest action-call receipts from connected agents

Latest action-call receipts from connected agents

Apr 23, 09:23 AM

Apr 23, 09:23 AM

Apr 23, 09:23 AM

Shopify

Shopify

Shopify

Creates Or Updates An Asset For A Theme

Creates Or Updates An Asset For A Theme

Creates Or Updates An Asset For A Theme

Success

Success

Success

Apr 23, 09:21 AM

Apr 23, 09:21 AM

Apr 23, 09:21 AM

Shopify

Shopify

Shopify

Update Products Param Product Id

Update Products Param Product Id

Update Products Param Product Id

Success

Success

Success

Apr 23, 08:53 AM

Apr 23, 08:53 AM

Apr 23, 08:53 AM

Shopify

Shopify

Shopify

Update Products Param Product Id

Update Products Param Product Id

Update Products Param Product Id

Failed

Failed

Failed

Apr 22, 22:13 PM

Apr 22, 22:13 PM

Apr 22, 22:13 PM

Shopify

Shopify

Shopify

Create Product Image

Create Product Image

Create Product Image

Success

Success

Success

Apr 22, 22:12 PM

Apr 22, 22:12 PM

Apr 22, 22:12 PM

Shopify

Shopify

Shopify

Create Product Image

Create Product Image

Create Product Image

Success

Success

Success

Connected integration coverage

Connected integration coverage

Connected integration coverage

162

162

162

of 753 accessible connected

of 753 accessible connected

of 753 accessible connected

Callable actions

Callable actions

Callable actions

1,126

1,126

1,126

Vault credentials

Vault credentials

Vault credentials

8

8

8

Explore what's possible

Explore what's possible

Explore what's possible

See all Integrations

See all Integrations

See all Integrations

Google Ads

Google Ads

Google Ads

All available Goolge Ads tools via...

All available Goolge Ads tools via...

All available Goolge Ads tools via...

X (twitter)

X (twitter)

X (twitter)

All available X tools via...

All available X tools via...

All available X tools via...

Github

Github

Github

All available Github tools via...

All available Github tools via...

All available Github tools via...

Notion

Notion

Notion

All available Notion tools via...

All available Notion tools via...

All available Notion tools via...

Slack

Slack

Slack

All available Slack tools via...

All available Slack tools via...

All available Slack tools via...

Firecrawl

Firecrawl

Firecrawl

All available Firecrawl tools via...

All available Firecrawl tools via...

All available Firecrawl tools via...

753 integrations are available for loadouts.

753 integrations are available for loadouts.

753 integrations are available for loadouts.

The one tool

for every tool

your agent needs.

Give any AI agent real capabilities in seconds. Connect 27,000+ tools once, skip the setup headache, and let your agents execute.

Try Aident Loadout

Empower your Codex or OpenClaws to get real jobs done. Connect 27,000+ tools in one prompt, and let your agents deliver real results.

Try Aident Loadout

Empower your Codex or OpenClaws to get real jobs done. Connect 27,000+ tools in one prompt, and let your agents deliver real results.

Try Aident Loadout

Empower your Codex or OpenClaws to get real jobs done. Connect 27,000+ tools in one prompt, and let your agents deliver real results.