Skip to content

Stop dumping a tunnel QR + scan banner into the daemon log#282

Merged
edwin-zvs merged 1 commit into
mainfrom
daemon-skip-qr-stdout
May 30, 2026
Merged

Stop dumping a tunnel QR + scan banner into the daemon log#282
edwin-zvs merged 1 commit into
mainfrom
daemon-skip-qr-stdout

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

Problem

Every time the cloudflared tunnel comes up (on daemon start, on remote-control enable, on reconnect), the daemon writes a full-screen QR code plus a scan to open in a mobile client: line directly to stdout via println!. That clobbers terminal scrollback on every restart for anyone running agentd in the foreground or tailing its log.

It isn't necessary: the same QR is already rendered in the TUI's /remote-control modal (crates/cli/src/ui.rs:5785) and in the webui, and the structured tracing::info! line immediately below the call already logs both the browser and wss URLs — so tail -f / journalctl still surface where the tunnel landed.

Fix

Drop the print_qr call and the now-unused helper (crates/daemon/src/tunnel.rs). The QR renderer itself (render_qr_dense1x2) stays — the IPC paths that feed the TUI/webui modal still use it (crates/daemon/src/session.rs:1002,1014,1035).

Test

cargo test -p agentd --bin agentd   # 55 passed
cargo build -p agentd               # clean, no new dead-code warnings

🤖 Generated with Claude Code

Every time the cloudflared tunnel comes up the daemon was writing a
full-screen QR code plus a "scan to open in a mobile client" line to
stdout via `println!`. That clobbers terminal scrollback on every
restart and isn't necessary: the same QR is already rendered in the
TUI's `/remote-control` modal and in the webui, and the structured
`tracing::info!` line immediately after the call logs both the
`browser` and `wss` URLs.

Drop the `print_qr` call and the now-unused helper. The QR renderer
itself (`render_qr_dense1x2`) stays because the IPC paths that serve
the modal still use it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@edwin-zvs
edwin-zvs merged commit f6af17a into main May 30, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the daemon-skip-qr-stdout branch May 30, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant