docs(terminal): correct the tmux env-freshness rationale to one server per drive + sweep dead test - #362
Merged
anconina merged 2 commits intoJul 28, 2026
Conversation
…r per drive The per-session-socket change removed `new-session -e`, but six sites still gave per-pane `-e` re-injection as the reason a drive sees a rotated secret — including the load-bearing security comment directly above `loadTmux.spawn` and the `unsafeDisableSandbox` paragraph an operator reads to decide whether running without the jail is acceptable. Freshness now comes from each drive starting its own tmux server with that drive's scrubbed env; the env travels in the server's `environ`, never on argv where /proc/<pid>/cmdline exposes it. Also corrects two field docs the change invalidated (`tmuxSocket` absent now means the worker derives `tmux-<sessionId>.sock`, not a legacy single socket; `socketPath` is per-session, not one stable `tmux.sock`) and deletes the skipped `-e` test, whose body still passes an `env` field that no longer exists on the builder's parameter type — invisible only because the package tsconfig excludes test files, so it can never be un-skipped. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
12 tasks
anconina
enabled auto-merge (squash)
July 28, 2026 07:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #358 (review of the merged branch).
#358 removed
new-session -e— env values on the tmux command line areworld-readable via
/proc/<pid>/cmdline. Freshness now comes from starting asession-private tmux server with that drive's scrubbed env, so the env travels
in the server's own
environ. Seven sites still gave the deleted-emechanism as the reason a drive sees a rotated secret:
docs/agent-tools/terminal-driver.mdx— theunsafeDisableSandboxparagraph, i.e. the text an operator reads to decide whether running without
the jail is acceptable. It described a mechanism that no longer exists and
that leaked env on argv.
terminal-worker-backend-attach.ts— the load-bearing security commentdirectly above
loadTmux.spawn, plus the module header and theunsandboxedfield doc.terminal-spawn-plan.ts— all three sandbox-off sites.setup-terminal-tools.ts— the create-frame comment for the operator opt-out.Also corrects two field docs #358 invalidated:
tmuxSocket(absent now meansthe worker derives
tmux-<sessionId>.sock, not "the legacy single-socketdefault" — a wrong pointer when debugging a failed re-attach) and
socketPath(documented one stable
tmux.sock; production always passes the per-sessionpath).
Deletes the skipped
SUPERSEDED: -etest: its body still passes anenvfieldthat no longer exists on
buildTmuxSpawnArgv's parameter type, anexcess-property error hidden only because
packages/skills/tsconfig.jsonexcludes test files. It can never be un-skipped, so it is rot.
No behavior change.
Related Issue
N/A: documentation, comments, and one dead skipped test — no runtime behavior or
security expectation changes.
Type of Change
Checklist
pnpm validate) — see Additional Notes(N/A — no behavior change)
N/Areason
RED Test Proof
EXEMPT: comments, docs, and removal of one already-skipped test. No
packages//src/* behavior change.
Evidence and Residual Risk
boundary; no code path changes)
the post-fix(terminal): keep drive secrets off the tmux command line via one server per session #358 call path (
runOneShot(a.env)carries the env;buildTmuxSpawnArgvno longer accepts one)
docs:check,tsc -b packages/skills packages/daemon, terminal-driver unit tier (917 passed)same rationale drifting again after a future change to the tmux backend. This PR
does not add such a check.
Screenshots
N/A
Additional Notes
pnpm validateon my dev box:docs:check,build:clean,cycles(0 circularacross 16 dist packages),
cycles:refs, andlint:security(0 errors) all pass.test:coverageends 60 failed / 41114 passed across 15 files, all in thereal-bwrap / live-PTY / jsdom tier that is broken on this host
(
bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted;localStorage.removeItem is not a functioninpackages/web). This PR touchesno web code and changes no runtime behavior, so those cannot originate here —
but the per-package coverage floors never evaluated (the run aborted first), so
CI is the first place that gate actually runs.