The wheel gate reads each CLI's wheelForward rule from the registry (window.__codemanWheelForward) instead of a list of ids, so a custom full-screen CLI in clis.json can opt in.
A persistent:false watcher closes on its first error (closeWatcherOnError), so a failing fs.watch costs one warning instead of an endless climb to /, and TeamWatcher re-creates a stopped watcher from its 30 s poll.
The DeepSeek Harness web tab trades the dsh web launch token for its session cookie, a relative <base href> resolves against the document's own directory, and root-absolute import("/...") inside scripts is rewritten onto the proxy prefix.
# Conflicts:
# src/web/routes/webview-routes.ts
# test/routes/webview-routes.test.ts
chokidar 3 reports a one-off ENOENT race (a new file gone between its
stat and its watch) through the same TypeError as a lasting EMFILE, so a
watcher that stayed closed ended live team and task updates until a
restart. Each poll tick now re-creates a stopped watcher, as
WorkflowRunWatcher already does, and an outage warns once rather than
once per attempt. Also imports getErrorMessage from the types barrel.
A version-gated rule reads the session's cliVersion, which the server
probes only for an entry that declares capabilities.gates, so a custom
entry with version-gated and no gates never forwards. Also brings the
claude and copilot comments in line with the code that now reads them.
The --list column is rowLabel() cut to 48 characters: an unnamed session
shows its folder, a long name ends in an ellipsis, and neither resolves as
a name. Point at attaching by number instead. Review on #834.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review on #834: drop the Prettier reflow of docs/tui.md and keep only the
new example line and paragraph, put "two" back in the fast-paths
sentence, list <n|name> in the tui-app.ts fileoverview, and add a
codeman tui <name> line to the README and the Remote Access wiki page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
codeman tui <session> takes a list number or a session name. Digits only
stay a number; anything else matches the session name exactly
(case-sensitive, never a prefix, folder or prompt). Names are not unique,
so two live matches refuse and print their numbers; a name only a RECENT
row carries says the session has finished. The target is resolved before
the TTY check, so scripts get these answers without a terminal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The browser's wheel gate named copilot, pi, claude and codex by id, so a custom clis.json entry that launches pi could not get the forwarding #771 gave stock pi: after every tab switch or reload its wheel scrolled an empty local buffer. Copying pi's altScreen value into such an entry made it worse, since the mouse DECSETs were then stripped while nothing forwarded the wheel.
The server now publishes every CLI's wheelForward rule as window.__codemanWheelForward, disabled entries included because disabling a CLI leaves its sessions running, and _shouldForwardWheelToApp reads that map instead of an id list. Stock CLIs keep their behaviour, and a minVersion that is not MAJOR.MINOR.PATCH refuses forwarding instead of comparing as passing.
Browsers fetch the web app manifest without cookies unless the link sets
crossorigin="use-credentials". With a password set, manifest.json needs
the codeman_session cookie, so it answered 401 and Chrome refused to
install Codeman as an app.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The WebSocket leg sent the browser's whole Cookie header to a trusted dashboard, including Codeman's own codeman_session, which the dashboard could then replay against the API. Filter it through filterCookieHeader like the HTTP leg, and omit the header when nothing remains.
The HTTP leg puts the server-held dsh credential in front of the browser's own
cookies; the upgrade leg replaced them with it. A managed dsh tab is trusted, so
its other cookies must survive there too. Filter the request the way the HTTP
leg does and merge the credential in front.
Order is the point: a `Cookie` header can name the same cookie twice, and the
first value is the one parsers keep, so appending the credential let a stale
browser copy of the same dsh cookie shadow the one the running process minted -
the tab would come back to the 401 this path exists to prevent. Both legs now
lead with it, and a route-level test asserts the bytes the upstream sees on the
upgrade, not only on the HTTP request.
The scanner now takes the first `dsh web:` line that parses as an http(s)
URL AND carries a token, as the boot contract describes, instead of
settling on an earlier plain URL and reporting no launch URL. The
tokenless line is still what identifies an older, ungated dsh in the wait
loop.
The root-absolute import("/...") rewrite ran over the whole document, so
visible text such as <pre>import("/x")</pre> was rewritten too. Run the
specifier rewrite per <script> body and leave markup text untouched.
rebaseRelativeBase resolved a relative <base> against the proxy root, so
a document served from a subdirectory of its dashboard (for example
/webview/<cap>/app/page.html with <base href="./">) pointed at
/webview/<cap>/ and loaded its assets one level too high. Pass the
request's wildcard path into rewriteHtml and resolve the base against
the document URL, which keeps the proxy root for the landing page.
The managed DeepSeek tab is trusted, so the browser's own cookies for the
dashboard are forwarded. The injected dsh credential replaced that header
instead of joining it, dropping any other cookie dsh had set. Append the
pair to the filtered browser cookies and leave the rest untouched.
The launch URL comes from the child's output but fetching it is a request
made by the Codeman server, so a banner naming another host or another
local service could aim it. Require 127.0.0.1 and the port just spawned
before the exchange runs, and mark the server as unusable for reuse if
the check fails.
Reuse returned the running server whenever it answered HTTP and matched
the authority, including one whose launch token could not be exchanged
for a cookie. That server answered 401 forever, so the restart the
warning asks for could never happen. Track the failed exchange and skip
reuse, which makes the next start request stop and respawn it.
The banner parser and the boot wait each took the FIRST `dsh web:` match,
so a diagnostic such as `dsh web: loading profiles` printed before the
banner made parsing return null on every poll and boot gave up after four
seconds. Scan every line and take the first payload that parses as an
http(s) URL, and only scan complete lines in the wait loop so a banner
split across two output chunks is waited for instead of being parsed
truncated.
Drive the real proxy route against loopback listeners and assert the
Cookie header dsh would receive: the minted port gets it, another port,
an unmanaged tab and a multi-user owner without the grant get none, and
a granted multi-user owner still gets it.
`managed` is accepted from the client on POST/PATCH /api/webviews and
GET /api/deepseek/web publishes the live port, so a saved managed record
pointing at that port was enough to receive the dsh-auth cookie. Gate it
on the same privileged-commands grant POST /api/deepseek/web requires,
fail closed for an ownerless record in multi-user mode, and record the
user whose request started the process so the supervisor only hands its
cookie to that identity. A request from another owner restarts the server
rather than reusing a cookie that is not theirs.
When a web tab's boot module (or any asset it builds at runtime) escapes the
`/webview/<cap>/` prefix, the request reaches Codeman's 404 with nothing to relay
to: the frame's document URL is masked, so its `Referer` carries no capability
and the existing fallback declines. The tab then shows a blank page or a spinner
that never resolves, and the log says nothing — the failure mode that made the
DeepSeek Harness tab un-diagnosable twice.
Classify that shape conservatively on the 404 path (asset-shaped
`Sec-Fetch-Dest`, same-origin `Referer` at the masked landing path, not `/api`,
not one of Codeman's own files) and log the path once per five minutes. Nothing
is relayed or rewritten: this only turns a silent blank tab into one grep.
Also document the boundary in `docs/web-tabs.md` — the root-absolute URLs the
proxy never sees (runtime-built `import()`, imports inside external `.js`, static
imports in inline scripts, service-worker registration, `url()` in external
stylesheets) — so the next occurrence starts from the list instead of from zero.
`dsh web` gates its own index behind a per-process launch token it prints on
boot, and only that URL mints the `dsh-auth-*` cookie every later request needs.
The managed tab stores the clean URL, so nothing on the browser side could
present the token: the iframe rendered dsh's 401 text, a blank tab.
Read the token out of the captured boot output, trade it for the cookie once at
startup (`redirect: 'manual'`, since the 303 is what carries Set-Cookie), and
let the proxy present it on both the HTTP and WebSocket legs. Scoped to the
exact loopback authority the cookie was minted for; a token-less banner (an
older dsh) keeps the previous behaviour untouched. The banner is scanned on its
own 256 KB budget rather than the 16 KB error-tail buffer: a chatty profile can
fill that cap before the banner prints.
Authentication alone was not enough. dsh ships `<base href="./">`, which a
browser resolves against the DOCUMENT url — and the proxy's runtime shim
rewrites that url to strip the `/webview/<cap>/` prefix. The base therefore
landed on Codeman's root: every module script 404'd and the page painted its
inline `#151517` background with nothing on it (the black screen that replaced
the white one). `rewriteHtml` now resolves a relative base against the proxy
prefix before the mask can run, leaving a cross-origin base exactly as written.
Verified against dsh 0.2.1-rc.5 and a live Codeman build: bare GET 401, captured
cookie 200, proxied `/api` WebSocket 101, and a headless-Chrome load of the
proxied tab boots the full Harness UI with no console errors.
The header's CPU figure was the 1-minute load average divided by the core
count, capped at 100. Load counts runnable tasks, not busy time, so a host
with bursty processes, or a VM whose vCPU threads count as runnable, read
100% while most cores were idle. It is now busy time across all cores
since the previous reading, from os.cpus(), with a one-second minimum
window on the monotonic clock.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
port_in_use() connected with bash's /dev/tcp and waited for the answer.
A listening port answers at once and a closed one is normally refused
at once, but on WSL a connect to a closed 127.0.0.1 port is dropped
and only fails at the kernel's connect timeout, minutes later
(measured: still waiting after 10 s; ::1 is refused at once). The
first-run port search tries up to 100 ports from 3000 and the start
path checks the chosen port again, so a first run on WSL stalled.
Each connect now runs in a background subshell that port_answers()
waits on for at most 20 x 50 ms, then kills; no answer in time reads
as free. Bash 3.2 clean: no `timeout` (macOS ships none), no `wait -n`.
Test: a python3 listener with a full accept queue (Linux drops further
SYNs, the same no-answer a WSL closed port gives) must be given up on
within 3 s; a listening port and a closed one still answer at once.
With the old unbounded connect the first test fails at its 10 s cap.
A tmux built from master (`tmux -V`: next-3.7) prints nothing, exit 0,
for `list-keys -T <table>` when the table holds exactly one binding.
tmux 3.4 prints the line. One binding is the shape
restrictTmuxPrefixTable leaves behind (`<prefix> send-prefix`), so on
that tmux the reduced table read as needing a reset and every session
create reset it again. `codeman tui` read its prefix table the same
way, so readPrefixBinding called a bound key free and readDetachKey
found no detach key.
A blank answer is now read from the full `list-keys` listing, keeping
only that table's lines. The parsers already match on `-T <table>`.
Tests: recorded-command cases for the blank answer (reduced table kept,
stray binding still reset) and TuiClient cases for both reads. The
real-tmux helper reads tables through the same fallback, and the
escaped `C-\` check accepts the unescaped form the full listing prints.
chokidar 3 with `persistent: false` has no guard for an `fs.watch` that throws (EMFILE once the inotify instance limit is used up, ENOSPC once the watch limit is). It emits the error, then a TypeError, then retries on the parent directory, and ends up re-adding `/` forever. TeamWatcher only logged its `'error'` events, so one failed watch became an endless stream of stack traces. WorkflowRunWatcher already closed its watcher on error, but `close()` removes every listener, so the TypeError from the same pass became an unhandled rejection, one per 10 s poll, and the server exits after five of those in a minute.
`closeWatcherOnError()` closes the watcher on its first error, keeps a no-op listener on it, and turns its `add()` into a no-op, since a callback chokidar still has in flight can otherwise re-add a path and reopen it. TeamWatcher logs one line per watcher and relies on its 30 s poll; WorkflowRunWatcher still drops the watcher and re-arms it on the next poll.
_onSubagentDiscovered pointed readers at openAllActiveSubagentWindows(),
which went with the frontend cleanup.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
src/web/public is plain <script> files with no imports, so knip cannot
follow it and ESLint does not cover it; leftovers there went unnoticed
until this cleanup. `npm run check:frontend-dead` is the counterpart of
`npm run knip` for that tree:
- JavaScript: every function, method and top-level binding, counted
against the identifiers and string literals of the frontend files,
index.html (inline handlers), the gesture overlay's source and the
tests. A name with no reference but its own definition fails the check.
- CSS: every class and id of styles.css and mobile.css against the same
text. A class built at runtime is recognised by its prefix or suffix.
- `--production` also lists what only tests reference.
It parses with the TypeScript compiler and PostCSS, both already dev
dependencies. Clean on this tree; run against the tree before the
cleanup it reports the 28 functions and 43 selectors that were removed.
On demand for now, not a CI step.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
capture-readme-gifs.mjs, capture-readme-real.mjs, capture-readme-skin.mjs,
capture-video-screenshots.mjs (it wrote to scripts/scripts/remotion/public,
a path that does not exist) and verify-session-sidebar.mts, a one-time
harness for the session sidebar that imported the server's internals
without being type-checked. Nothing in package.json, CI, the docs or
another script names any of them. 2,719 lines.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A subagent window could host an xterm attached to a teammate's tmux pane,
but only for a teammate listed in teammatePanesByName, and the SSE
listeners that filled that map were removed in February. Since then the
branch could not be taken, and the code behind it was unreachable:
- initTeammateTerminal and the lazy dispose / restore pair that parked a
teammate terminal while its window was minimized or hidden;
- the two maps (teammatePanesByName, teammateTerminals) and every loop
over them: window close and reconnect cleanup, the live font-weight
save and the skin switch;
- the two early returns in renderSubagentWindowContent that protected a
terminal which could not exist.
Subagent windows render their activity list exactly as before, and a
teammate still gets its name and badge from the agent description. The
server side is untouched: TeamWatcher still holds respawn back while
teammates are active, and the teammate-pane routes remain.
Tests and docs that described "Agent Teams panes" now name what a font
or skin change really reaches: the main terminal, the tiles and the
split pane.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The wizard's only entry point was the "Start Ralph Loop" button on the
start screen, removed in 1.50.0, so none of this could be opened or
triggered from the app any more:
- ralph-wizard.js (the wizard, plan generation flow and the floating plan
subagent windows) and the #ralphWizardModal markup;
- the "Plan Wizard Agents" section of the monitor panel with its cancel
button, and the five plan:* SSE handlers that only fed these surfaces;
- the wizard branches in the subagent window code: connection lines to
the wizard and to plan agents, window placement beside the wizard, and
the wizard cleanup on reconnect. The ordinary path (agent window to its
parent tab) is unchanged, only un-nested;
- the wizard's state on the app object and its z-index constant;
- its styles: 67 classes, three keyframes and a second identical
@keyframes spin.
What stays: the Ralph panel, the Ralph tab in session options, the plan
routes (/api/generate-plan, /api/generate-plan-detailed,
/api/cancel-plan-generation, the ralph-wizard file routes) and the
plan:* SSE events, which are part of the public API. A client that
starts plan generation over the API still gets its events; the page no
longer draws anything for them.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
toggleMonitorDetach / toggleSubagentsDetach and their two drag setups
were the same 97 lines twice, differing only in three element ids. They
now call _togglePanelDetach(panelId, headerId, detachBtnId) and
_setupPanelDrag(panelId, headerId); the two public names stay, since
index.html calls them.
Checked in a browser: each panel detaches, drags by its header inside
the viewport, docks back, and after a second detach one drag moves it
exactly once (the header's previous listeners are still replaced).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- Nine one-off scripts from January and February that nothing references:
three Ralph wizard drivers that click the start-screen button removed in
1.50 (against the production port, with a personal case name), a respawn
monitor with a hardcoded session id, link-detection experiments for
patterns that no longer exist, and two screenshot and data helpers.
- @types/uuid: uuid 14 ships its own types and TypeScript already
resolves them from the package.
- config/knip.json now describes the workspace layout it runs in (its
top-level entry and project keys were being ignored), names the manual
scripts as entries, lists the system binaries tests shell out to, and
honours @knipignore. `npm run knip` reports nothing; CLAUDE.md says so.
- Two more unused tap helpers in the mobile test toolkit.
- Docs that pointed at files which no longer exist: the browser testing
guide (four deleted test files), the orchestrator panel's file name, two
spawn modules in the Ralph guide, the respawn mock utilities.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The frontend JS is outside ESLint and knip, so this pass used an AST scan
(every method, function and top-level constant in src/web/public, counted
against identifiers, strings and index.html) plus a selector scan of both
stylesheets. Each hit was confirmed by text search before it went.
JavaScript
- The ten run<Cli>() one-line wrappers and the quickStart() alias: run()
has dispatched to _runCliMode(mode) since the launcher consolidation and
nothing called the wrappers except tests, which now call the launcher.
- The Agent Teams panel code that lost its event listeners in February:
the team tasks panel, the teammate pane window, rebuildTeammateMap and
the three maps that nothing filled any more.
- Unreferenced methods: redockSession, refreshOrchestratorStatus,
toggleSubagentPanel, minimizeSubagentWindow,
openAllActiveSubagentWindows, pickBetterPath, getTodoIcon, deletePreset,
closeRunSummary, saveSessionOptions, getAgentParentSessionId,
_isUltracodeAgentMinimized.
- Six unused constants and a few unused locals (an unused frame-time
computation in the touch scroll loop among them).
CSS
- 62 classes and one id that no markup, script or test names: the old
settings-item / settings-section layout, the pre-redesign respawn and
context-settings rows, the existing-wizard card and others. 116 rules
and about 770 lines. A dead class inside an :is() list only loses that
alternative; the rule stays.
Checked in a browser against an isolated instance: no console errors on
desktop or phone, a shell session runs, and 96 screenshots (desktop,
tablet and phone; settings, session options, add case, panels) are
pixel-identical before and after, apart from clock times.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Found with knip (exports, types, class members) and confirmed by a text
search of src, test, scripts and packages before each removal.
- Per-CLI get<Cli>NotFoundMessage() (nine of them) with their message
constants: missingCliMessage() builds that text from the registry now.
- Registry leftovers: renderCliCommand, asCliId, cliIds, isCliRunnable,
createCliResolverForTest, profileExists, and two name lists that only
repeated schema enums.
- A task-description cache in Session that was written on every chunk of
terminal output (one regex pass per line) and never read since the
subagent watcher takes descriptions from transcripts. The cache module,
its pattern and both parse methods go with it.
- Session.parentAgentId / childAgentIds: never set by anything, so the two
optional SessionState fields were never on the wire.
- Unreferenced methods on TmuxManager (pipe-pane pair, syncMouseMode),
RespawnController, StateStore.recoverFromBackup (load() already falls
back to the .bak file), TeamWatcher, SseStreamManager and the AI
checkers' getErrorVerdict.
- updateCaseEnvVars: the settings.local.json env path that envOverrides
replaced.
- Re-exports in the utils, cli-registry, routes and prompts barrels that
no importer used, and unused test helpers (MockStateStore, the mobile
throttle helpers and others).
Eight mobile tests imported the WebServer type from a path that does not
exist (../src instead of ../../src); type-only, so nothing failed.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The response viewer, the rename's /resume title and the Discord bridge's last message read a local session's own Claude config folder (part of #701). No changeset: the next release names it.
The viewer looked for a Claude transcript under ~/.claude/projects only, and
for the conversation after a /clear in ~/.claude/history.jsonl only. A session
started with its own CLAUDE_CONFIG_DIR (a second account, #255), or any session
on a server that exports one, writes both elsewhere, so the eye button showed
"No response yet" or a terminal dump, and codeman agent read and the Discord
bridge's last message came back empty. This is the third part of the report
in issue 701; the other two are a design choice and a feature request.
lastResponseFor() now asks claudeConversationDirs() for the folder the
session's claude writes to: its own override, then the server's, then
~/.claude, through claudeProjectsDir(), which the relaunch pin and the Edit
history panel already use. The rename's /resume title takes the same lookup
when no hook has named the transcript yet.
- Local sessions only. In a Docker case or on a remote host the override
names a folder over there, and the same path on this host is someone else's.
- A relocated folder is a path somebody chose, so it is probed bounded first
(the rule from issue 516). Anything but a directory reads as no transcript,
never as a reason to look under ~/.claude, where a file of the same name is
another account's conversation.
- The default folder is not probed, so that path is as before.
Not changed: the resume pre-validation at session create and the host-wide
history scans still read the default folder.
Tests: five route cases for the viewer (own folder, the server's, no fallback,
/clear through the relocated history, Docker left alone) and one for the
rename. Each part of the change fails one of them when reverted.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The two commits of #803 that came after 1.51.0 was cut. The earlier commits (every model that fits, Muse Glimmer 30B and Ornith 1.0 9B) shipped in 1.51.0. No changeset: the next release names it.
Three corrections to the row added in 5396e33b, none of which changes where it is offered:
- Its peak. The run gave the process footprint's LIFETIME maximum, read at the end: 3.0 to
3.3 GB above what was held then. That is a floor, because a larger transient during the
earlier, longer prompts would not show in it. The row now takes the first measured row's
5 GB: 36.1 GB at 65,536 tokens (0.960 of a 48 GB Mac's estimate) and 39.0 GB at 131,072
(0.972 of what that Mac's runtime measures).
- What was compared. The two builds were not given the same prompt in OpenCode: the GGUF
build got a one-line task through the skill's sendmark (which adds its answer-file
sentence), the MLX build a plain one-line prompt. And the speeds to set side by side are
the two from the same 300-token request, 15.2 and 30.2.
- Runtime issue 18269: whether the memory fix its maintainer promised predates the pinned
runtime is not known, and the header says so.
Also a stale comment: the catalogue holds eleven models.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Run on a MacBook Pro (M5 Pro, 48 GB, runtime 0.40.15) on 2026-11-12, after the GGUF build
this branch lists turned out to be unusable in agent use there: an OpenCode turn of one
line showed no answer after 7 minutes, twice, although the runtime alone wrote 15 tokens
per second.
The MLX build of the same model (`muse-glimmer:30b-mlx`, 19.1 GB) on that Mac:
- 32.6 tokens per second for a 1,500-token answer. The tag carries a draft model, and the
runtime logs speculative decoding with 0.34 to 0.62 of the drafts accepted.
- A correct tool call in under 3 seconds, and the same OpenCode turn finished in 45 seconds.
- Memory, read from the runner's own log line after every request: 37,900 to 45,100 bytes
held per token (the GGUF build computes to 7,072), prefix snapshots that filled their
8 GiB during twelve separate prompts, and a process peak 3.0 to 3.3 GB above what stayed
held.
So it gets a row of its own, the second with measured figures. They put it at 34.6 GB for
65,536 tokens: offered from 48 GB up, never on the 32 and 36 GB Macs, which keep the GGUF
row untouched (it is still the pick of a 32 GB Mac with a Max chip: whether it should be
is the maintainer's decision). It is never the pick of a Mac whose disk has room for
Qwen3.6 35B-A3B, and it has no `tested` entry: one turn is not a test.
Also written down from the same session: the session of many prompts the Qwen3.6 35B-A3B
row owed (5.6 GiB of prefix snapshots after twelve prompts, still growing; its figures are
unchanged), and what the two open runtime issues on the MLX tag say against what ran.
Not done: the row was not installed through the window, and the measurement used a second
instance of the pinned runtime, not Codeman's.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>