claw-code/rust/crates/rusty-claude-cli
TheArchitectit 8f1ad0dc9a fix(tui): dup fd 1 to /dev/null during turns — no more output bleeding
THE REAL FIX: Before each model turn, save fd 1 (stdout) via dup(),
redirect it to /dev/null via dup2(), run the turn, then restore the
original fd. This catches EVERY possible stdout write during the turn:
runtime streaming, tool executor formatted output, bash subprocess
inheritance, crossterm escape codes, println! — all silently swallowed.

Previous approaches (emit_output=false, Vec<u8> buffer, screen clear)
were insufficient because the runtime's consume_stream writes to the
real io::stdout() through separate code paths that bypass our buffer.

Changed workspace unsafe_code from forbid→warn, and allow it in
rusty-claude-cli specifically. The dup/dup2/close calls are
single-threaded POSIX syscalls with well-understood semantics.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 11:11:19 -05:00
..
.claw/sessions feat(runtime): typed task packet format for structured claw dispatch 2026-04-04 00:40:20 +09:00
src fix(tui): dup fd 1 to /dev/null during turns — no more output bleeding 2026-06-12 11:11:19 -05:00
tests fix: /config help returns structured section list (#344) 2026-06-05 07:09:48 +09:00
Cargo.toml fix(tui): dup fd 1 to /dev/null during turns — no more output bleeding 2026-06-12 11:11:19 -05:00
build.rs fix: expose complete version provenance 2026-06-04 15:55:08 +09:00