[BUG] Desktop app launches Code sessions with stale `CLAUDE_CODE_SUBSCRIPTION_TYPE=pro` on a Max account, so Ultracode silently does nothing
Environment
- Claude desktop app 2.16120.0, macOS (arm64), Code tab
- Bundled Claude Code 2.1.284 (Agent SDK 0.3.284)
- Plan: Max 5x (the desktop app's own usage panel reports "Max")
What happens
With Ultracode selected in the Code tab, sessions never use dynamic workflows. The picker shows "Ultracode" and the app saves sessionSettings.ultracode: true for the session, but inside the session:
- the Workflow tool is not loaded
/deep-researchand/workflow-authoringare missing- there is no "Ultracode is on" reminder
No error appears anywhere. None of my desktop sessions with Ultracode selected (Claude Code 2.1.281 and 2.1.284) ever ran a workflow.
Cause
The desktop app launched the session's Claude Code process with these environment variables (next to CLAUDE_CODE_OAUTH_TOKEN):
CLAUDE_CODE_SUBSCRIPTION_TYPE=pro
CLAUDE_CODE_RATE_LIMIT_TIER=default_claude_ai
With token-from-env auth, Claude Code takes the plan from these variables. On pro, dynamic workflows default to off, so Ultracode is unavailable. The app's apply_flag_settings push of {ultracode: true, effortLevel: "xhigh"} returns success, but get_settings then reports ultracode: false, ultracodeRequested: true, ultracodeAvailable: false.
The account is Max. The desktop usage panel says "Max", and the same account's terminal login reports default_claude_max_5x.
Reproduction
I replayed the session's exact launch arguments using a dummy token (no model calls), then sent initialize, apply_flag_settings {ultracode: true, effortLevel: "xhigh"} and get_settings over the control protocol:
| Environment | Workflow commands | ultracode after the push |
|---|---|---|
| CLAUDE_CODE_SUBSCRIPTION_TYPE=max | present | true |
| CLAUDE_CODE_SUBSCRIPTION_TYPE=pro (what the app passed) | missing | false (requested, unavailable) |
| pro, plus "enableWorkflows": true | present | true |
Workaround
Sign out of the desktop app and sign back in. Afterwards, sessions launch with max / default_claude_max_5x, the launch settings include ultracode: true, and Ultracode works. Setting "enableWorkflows": true in ~/.claude/settings.json also works around it.
Expected
- The desktop app should pass the account's current plan to Code sessions, or refresh it, instead of a stale value from an earlier sign-in. It already shows the right plan in its usage panel.
- When Ultracode is requested but unavailable, the app shouldn't show it as active. Claude Code reports
ultracodeAvailableinget_settings, and its schema says hosts should offer an Ultracode control only while that is true. apply_flag_settingsshould probably return an error, not success, when theultracodeit was asked to set doesn't take effect.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗