[BUG] IS_DEMO silently removes /subtask and reverts /fork, and it is the only remaining way to hide account info
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
IS_DEMO=1 is currently the only way to keep the account email and organisation name off screen. CLAUDE_CODE_HIDE_ACCOUNT_INFO no longer exists in the shipped binary (0 occurrences in 2.1.224) and was dropped from the env-vars docs.
Setting IS_DEMO=1 also silently changes the slash command surface:
/subtaskis never registered. Typing it returns an unknown command error./forkreverts to the older behaviour ("Spawn a background agent that inherits the full conversation") instead of the newer one ("Copy this conversation into a new background session and keep working here").
Nothing warns about this, and no message explains why /subtask is missing.
In the 2.1.224 bundle the command registry reads (identifiers renamed for clarity):
...j1() && !hr(ee.IS_DEMO) ? [forkNew, subtask] : [forkOld]
j1() is the agent-view check, and it already covers whether the host UI is present. The extra IS_DEMO term is what removes /subtask.
Every other IS_DEMO read site in the binary is cosmetic: skip onboarding (2 sites), hide the organisation name in the header, hide organisation and email in /status (2 sites), hide the "Message from <org>" banner. The command registry is the only site that changes functionality.
This is the same class of problem as #37780, where IS_DEMO suppressed the workspace trust prompt and left statusline and hooks broken. People reach for IS_DEMO because it is the only identity-masking switch left, then get unrelated behaviour changes they did not ask for.
What Should Happen?
IS_DEMOshould only mask identity in the UI. It should not decide which slash commands exist. Gate the/forkand/subtasksplit onj1()alone, or on a dedicated flag, the way theforksubagent type already usesCLAUDE_CODE_FORK_SUBAGENTplus its own remote flag.- Restore a supported, documented way to hide the account email and organisation, for example
CLAUDE_CODE_HIDE_ACCOUNT_INFO. See also #63024 and #72867. Then people who record screencasts or share a screen do not have to reach forIS_DEMOat all.
Steps to Reproduce
- Add
"IS_DEMO": "1"to theenvblock of~/.claude/settings.json. - Restart Claude Code.
- Type
/subtask. It reports an unknown command. - Type
/fork. It shows the old description, "Spawn a background agent that inherits the full conversation". - Remove
IS_DEMOand restart./subtasknow exists, and/forkshows the new description.
Is this a regression?
Not sure. /subtask appears to be new, so this may have shipped with the /fork split.
Claude Code Version
2.1.224
Platform
Claude Code CLI, macOS (Darwin 25.5.0)
Additional Context
CLAUDE_CODE_COORDINATOR_MODE and CLAUDE_CODE_DISABLE_AGENT_VIEW were unset in both cases, and disableAgentView was not present in any settings file, so the agent-view gate was satisfied throughout.
Showing cached comments. Read the full discussion on GitHub ↗
3 Comments
Thanks for the detailed report. Reproduced on 2.1.233: with
IS_DEMO=1,/subtaskreturns "Unknown command" and/forkfalls back to the older in-session subagent behaviour; without it,/subtaskis registered and/forkcopies the session into a new background session.This is currently deliberate: demo mode makes the session look like the simpler no-agent-view product for recordings, and that includes keeping the older
/forkand dropping/subtask(it started with the/fork//subtasksplit in 2.1.212). But we agree it's confusing — the docs describeIS_DEMOas only hiding your email/organisation and skipping onboarding (https://code.claude.com/docs/en/env-vars), and nothing tells you why/subtaskis missing.We're considering either dropping the demo-mode term from the
/fork//subtaskgate soIS_DEMOis purely cosmetic, or at least documenting the command changes. On the second point:CLAUDE_CODE_HIDE_ACCOUNT_INFOnever shipped in the binary — it appeared in the docs by mistake and was removed — soIS_DEMOis the supported identity-masking switch today.🤖 Generated with Claude Code
Can this behaviour be perhaps split into two parts?
For your information: the label
reproducedon this issue does not prevent it from becoming stale and eventually auto-closed. See https://github.com/anthropics/claude-code/issues/87647 for details, and consider upvoting that for visibility.This means this issue needs to acquire at least 10 thumbs up, or get new comments every time before the 14 days stale bot interval expires.