You signed in with anoth
8000
er tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
T45 — Box logs strips terminal control codes when stdout is not a terminal #3332
Piped min box logs of a PTY box prints the text without terminal control sequences; --raw keeps them.
Found in the owner's test run on 2026-11-12. min box logs bench replays the box's PTY transcript with raw terminal control codes, for example ESC[?2004h, and these pollute piped output. The owner chose (2026-11-12): when stdout isn't a terminal, strip terminal control sequences from a PTY transcript, and add --raw to keep them. On a terminal, output is unchanged.
Covers:
BCLI-012 (min box logs prints the box output BOX-155 captures)
Layers:
client:
crates/minimal/src/cli.rs: min box logs and the type nouns' logs take --raw
crates/minimal/src/cmd/boxes.rs: box_logs_on_hosts strips terminal control sequences (CSI, OSC and other escape sequences) from a PTY box's transcript when stdout isn't a terminal and --raw isn't given
crates/minimal/src/tests.rs: the in-process minimald test harness gains this layer's tests
cargo nextest run -p minimal box_logs_piped_pty_transcript_has_no_control_codes
cargo nextest run -p minimal box_logs_raw_keeps_control_codes
Plan block
### T45 — Box logs strips terminal control codes when stdout is not a terminal
slice: S2
kind: task
covers: BCLI-012
size: S
est: 50 code, 80 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: none new
observability: none new
layers:
- client:
- crates/minimal/src/cli.rs: `min box logs` and the type nouns' `logs` take `--raw`
- crates/minimal/src/cmd/boxes.rs: `box_logs_on_hosts` strips terminal control sequences (CSI, OSC and other escape sequences) from a PTY box's transcript when stdout isn't a terminal and `--raw` isn't given
- crates/minimal/src/tests.rs: the in-process minimald test harness gains this layer's tests
test: cargo nextest run -p minimal box_logs_piped_pty_transcript_has_no_control_codes
test: cargo nextest run -p minimal box_logs_raw_keeps_control_codes
produces: none
consumes: none
proof: `min box logs <pty box> | cat` prints the transcript text with no terminal control sequences; `--raw` prints them unchanged; a terminal still gets the raw stream.
changed nothing: Revise round 1: the directive lists only the failed macOS 'unit' check (and the 'ci-macos-success' aggregator that follows it). On macOS, 'just test' runs '-p minvmd -p boxes -p bep' (justfile 'scope'
598a96ae
2
pushed
973d30c6
3
pushed
04b35a15
4
pushed
cb6377e8
5
changed nothing: The directive asks for the fix to thread PRRT_kwDOPdfcxM622ZH_. Commit 33b8f33 (fix(minimal): end unterminated CSI at a line end in box logs) already makes this change on the branch. In ControlStripp
81397a84
6
changed nothing: Revise round 6 addressed a failed 'tests' job and its 'ci-linux-native-success' aggregator. The job log excerpt in the directive does not name a failing test. It shows only passing 'decode' tests and
Activity
minimal-foundry commentedon Nov 12, 2026
Done. #3335 merged.
branch
agent/3332-box-logs-strips-terminal-control-codes-when-stdo· epic #2879 · PR #3335598a96ae973d30c604b35a15cb6377e881397a842441aa09Updated 2026-11-13T02:51:35.652Z.