The owner: the Claude Code provider page should say whether its runs go
through the TUI or the CLI, and what tells them apart and what each gains.
Under a Claude subscription's accounts a row now says "Running as
Claude Code's interactive mode (TUI)" (a green dot) or "Running as
claude -p (CLI)" with why: turned off in Settings, failed to start lately, Claude
Code in WSL whose home wasn't found, not installed, or a system with no
interactive mode. Under the TUI it says which requests still run as -p
(safeguards, a JSON schema, an image by URL, a first message over
400KB). "TUI or -p?" opens what each is: entrypoint cli, the plan
counting a request at about half; entrypoint sdk-cli, about twice.
"Change in Settings" opens Settings › Models at the interactive mode's
row. Only switch, which serves nothing, shows no row.
The mode comes from GET /api/claude/mode (gateway.ClaudeModeNow), read
as the editor opens and kept 30s, never in /api/providers' polls. Its
machine-wide reasons are claudeMachineWhy, which claudePrintWhy now
calls first, so the row and the gateway's own choice can't disagree.
The row is drawn by claudemode.js, which app.js loads with that first
read, so it weighs nothing on the core: after a rebase on origin/main
29d0ab39f the core was 1,541,482 bytes, over its 1,539,856, and the
budget isn't raised. "Runs as" became "Running as" so its keys don't
clash with a plugin's "Runs as" in i18n-keys.
A per-account WSL folder the probe can't read is still found only at
run time; the doc says so.
Run:
- go vet ./internal/gateway ./internal/gui (darwin), GOOS=windows, and
GOOS=linux -tags nogui: 0.
- go test -run 'ClaudeTUI|ClaudeMachine|ClaudeSub' ./internal/gateway:
ok (TestClaudeMachineWhy is new).
- After the rebase on 29d0ab39f, on mote: go test -run
'CoreScriptBudget|I18n|Claude' ./internal/gui ok, the budget not
raised; old-webkit.test.cjs lists claudemode.js with the other
scripts app.js imports. Before the rebase, go test ./internal/gui: three reds that fail the
same on origin/main ccc791231: TestSettingsSaveKeepsWhatItDoesNotSend
(#4514), TestMainWindowCorners (#3949), and i18n-keys' "Unmarked"
(#4524).
- claude-mode.test.cjs in WSL (Chromium and WebKit, 1100 and 420, en,
zh, ja, de): 48 of 48.
- The full GUI suite on mote (load ~30) had 301 reds in 49 files; each
of those files was run again in WSL at this head (743 tests, 259 red)
and at origin/main ccc791231 (259 red, the same tests; #4600). The
one that held apart was account-weight at de web 390: the row puts
the accounts a screen above By weight on a phone, and Playwright's
click scrolled the chip back into view. The test now brings the chip
into view before it measures, so it judges the click's own scrolling;
account-weight and claude-mode, both engines: 50 of 50.
- After moving the row into claudemode.js: the 142 GUI files with a
Claude Code agent, in WSL (Chromium and WebKit): 1392 tests, 8 WebKit
reds in 7 files. Each of those files was run again alone at this head
and at 29d0ab39f: the same kind of WebKit reds on both, which
subtests changing from run to run (library-items, number-units,
routing-rule-models, usage-heatmap, usage-ledger-chart). phone-rows'
Routing click on .rt-day failed 1 of 4 runs at each (WebKit zh, ja,
de); the Routing page draws no such row. Filed under #4600, #4471,
#4112.
- Real use on xiaomi-gpu (Windows 11, sandbox HOME, Claude Code in WSL
magpie-desktop): /api/claude/mode said {"tui":true,"wsl":true}; with
the setting turned off through POST /api/settings,
{"tui":false,"why":"off","wsl":true}; set back, TUI again.
- Rebased on origin/main 02ff0e908 (no file in common): on mote, vet
for darwin, windows and linux nogui 0; go test ./internal/claudetui
ok; -run 'CoreScriptBudget|I18n|Claude|Budget' ./internal/gui ok;
-run Claude ./internal/gateway ok. In WSL claude-mode, account-weight,
old-webkit and i18n-keys: 59 of 60, the one red i18n-keys' "Unmarked"
(#4524).
Broken by hand: the editor draws twice before the read returns, and the
test's one-read check went red with two reads until the read in flight
was shared (claudeModeRead).
account-weight's check went red ("en 1000: a click scrolled") with the
chip's click made to scroll the editor 120px.
Not tried: the window on macOS with a real account (the row is the
same code as the web GUI's), and the "broken" reason with a real
failed start.