[Bug] --remote-control sessions no longer register with FleetView; 404 on /api/claude_code/settings disables fleet gate
Summary
Sessions started with --remote-control (in detached dtach -n mode) no longer register with FleetView or the agents view. They get a ~/.claude/sessions/<pid>.json file but no ~/.claude/session-env/<sessionId>/ marker dir is created, no repowise/MCP child processes are spawned beyond a basic playwright child, and interactive remote-control dialogs pop in the FleetView UI and vanish before they can be responded to, leaving the session stuck.
This used to work reliably for ~6 months and started failing ~2 weeks ago. Client binary mtime confirms no Claude Code self-update in that window (still on 2.1.138, May 10 mtime) — so this looks like a server-side change in the /api/claude_code/settings 404 response handling, or in a gate that previously defaulted permissive.
This is not the same as #53666 — that issue was the cosmetic ENOENT log noise. This is downstream functional behavior caused by the same 404 path.
Symptoms
Two observed manifestations, both reproducible:
- No FleetView visibility for fresh
--remote-controlsessions. Sessions spawned withdtach -n claude --remote-control <name>don't appear in FleetView's session list or inclaude agents. Pre-existing sessions started weeks ago (still running, never restarted) remain visible.
- Vanishing dialogs in attached sessions. Sessions that DO appear in FleetView (older ones, or attached
dtach -cforeground sessions) pop up an interactive permission/dialog modal that disappears before it can be answered. The session is then stuck — no input gets through, no way to recover exceptkill.
Repro
# Wrapper script (have used this exact form for months)
dtach -n /tmp/claude.$(date +%s).test.session \
claude --dangerously-skip-permissions --name test --remote-control test
Then check:
ls -la ~/.claude/sessions/<pid>.json # exists ✓
ls -d ~/.claude/session-env/<sessionId>/ # MISSING ✗ (should exist)
ps --ppid <pid> # only 1 MCP child instead of expected 2-3
Working sessions started before the regression have the session-env/<sessionId>/ marker dir and 2-3 child MCP processes. New sessions have neither.
Evidence: server-side 404 is the trigger
--debug log on every fresh session start shows:
2026-06-26T19:34:41.425Z [DEBUG] Remote settings: No settings found (404)
Direct curl with the same OAuth bearer used by the CLI confirms:
GET https://api.anthropic.com/api/claude_code/settings
HTTP 404
{"type":"error","error":{"type":"not_found_error","message":"Not found.",
"details":{"error_visibility":"user_facing"}},
"request_id":"req_011CcSS68J9qGr2fSxa2WL2y"}
Other endpoints work fine on the same token — /api/oauth/account/settings returns 200, Policy limits: Fetched successfully in the same startup, plus all claude.ai MCP proxy connections succeed. So this is specifically the /api/claude_code/settings endpoint returning 404 for this account.
The decompiled handler (in bin/claude.exe) treats 404 as "no settings — use empty object":
if (response.status === 204 || response.status === 404)
return y(`Remote settings: No settings found (${response.status})`),
{ success: true, settings: {}, checksum: undefined };
Downstream, an empty settings object appears to keep fleetGateRejected true (or isAgentsFleetEnabled false), and the per-session session-env/<sessionId>/ directory creation in the remote-control startup path is skipped. The claude binary contains these strings nearby: isAgentsFleetEnabled, fleetGateRejected, ensureFleetGateHydrated, gb-before-fleet-gate, session-env, .fleetview-heartbeat.
Account context
- Subscription tier:
team/default_claude_max_5x - OAuth scopes include
user:sessions:claude_code trustedDeviceTokenpresent- Re-login (
/login) refreshes the token cleanly but does NOT fix the 404 — so it's not a stale-token issue, it's an account entitlement or backend record for this account that's missing.
Asks
- Why does
/api/claude_code/settingsreturn 404 for this account when other endpoints return 200 on the same token? Was a remote-settings record removed ~2 weeks ago, or did the response shape/handler change? - The 404 → empty settings → FleetView-off chain looks like a regression on the server side — previously it apparently defaulted permissive. Can the empty case default back to fleet-enabled, or can clients on a
teamplan get a non-empty response? - Separately, the vanishing-dialog behavior (symptom 2) sounds like the remote-control output channel breaks when the gate is half-hydrated; that may be worth a separate look even if the gate logic is correct.
Diagnostic data
- Request ID for the 404:
req_011CcSS68J9qGr2fSxa2WL2y - Claude Code version: 2.1.138
- Platform: Ubuntu 22.04 (Linux 5.15.0-179)
- Node: v22.22.2
- Install:
npm i -g @anthropic-ai/claude-code(no self-update since May 10 — verified via mtime) dtachmode:-n(detached). Foregrounddtach -c(attached) still works as a workaround.
Happy to provide additional debug logs, env, or strace if useful.
4 Comments
Update with additional evidence — my initial guess that
dtach -c(attached) sessions still register was wrong. Just verified both modes side-by-side on the same machine:| Spawn mode |
dtachflag | session-env marker | child MCP procs | in FleetView ||---|---|---|---|---|
| attached |
-c| MISSING | 3 | no || detached |
-n| MISSING | 3 | no |So the regression is independent of
dtachattach mode. The 404 → fleet gate disabled chain fires regardless of how the session is launched. There is no client-side workaround that I've found; attaching to an existing session works fine but the session still isn't visible to FleetView for routing.Confirmed the inner Claude TUI is fully alive — attached to the broken session via
dtach -a, captured the screen:Session accepts input fine when attached interactively — it just isn't in FleetView and doesn't accept remote-control dialog responses. So the bug is specifically in the remote-control / fleet-gate registration path that the 404 short-circuits.
Refining the root cause — after looking more carefully at the decompiled startup path, the gate is more specific than "fleet rejected." Two relevant functions:
tengu_slate_meadowis a GrowthBook feature flag, defaulting tofalse. It's only true when the remote settings endpoint returns a payload that includes it. The 404 on/api/claude_code/settings→settings:{}(empty object) → all GrowthBook flags in that payload default false →isAgentsFleetEnabled()returns false → FleetView gate stays closed.Confirmed
CLAUDE_CODE_REMOTE=truedoes not work as a client-side workaround. That bypasses a different gate (allow_remote_controlpolicy) but not thetengu_slate_meadowflag. The deeper startup gets further (3 child MCP processes vs 1) but FleetView is still invisible to the session.So the precise ask: when
/api/claude_code/settingsreturns 404 for an account that previously had FleetView working, either (a) the 404 should not be returned for accounts that previously had a settings record, or (b) the empty-settings branch should preserve default GrowthBook flag values rather than zeroing the entire flag table. Right now any 404 for any reason silently removes FleetView for the user with no UI indication that anything is wrong.Resolved — wrong root cause in original report; actual fix was a client version update.
The 404 on
/api/claude_code/settingsturned out to be a red herring. The real gate was the cached GrowthBook flagtengu_ccr_bridgein~/.claude.json'scachedGrowthBookFeatures, which wasfalsebecause the cachedtengu_bridge_min_versionrequired2.1.139and the installed CLI was2.1.138. Sessions started prior to the server-side version bump stayed in FleetView (already-registered); new spawns failed silently because the slash command and CLI flag both checkZv()→OgH()→o88() && J$("tengu_ccr_bridge", false)which resolved to false at that pin.Upgrading from
2.1.138→2.1.193(npm i -g @anthropic-ai/claude-code@latest) restored both/remote-controlslash command availability and--remote-controlCLI flag behavior, with new sessions appearing in FleetView normally.Closing. Apologies for the misdiagnosis in the original report — leaving the breadcrumbs in case anyone else hits the same "FleetView stopped working" symptom on an older pinned CLI.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.