Skip to content

feat: sidemux log CLI + log/close guidance for agents - #45

Merged
tomfordweb merged 1 commit into
mainfrom
feat/log-ergonomics
Jul 30, 2026
Merged

feat: sidemux log CLI + log/close guidance for agents#45
tomfordweb merged 1 commit into
mainfrom
feat/log-ergonomics

Conversation

@tomfordweb

Copy link
Copy Markdown
Owner

Closes #36. Closes #34.

#36 — raw log unusable for grep

The per-job log holds raw terminal bytes: ANSI colors, OSC titles, and one spinner frame per \r repaint, so grepping a failed job's log returns spinner frames instead of the error.

  • New CLI: sidemux log <job_id|log-file> prints the log as display-ready text — escapes stripped, CR overwrites collapsed to their final frame (exactly what read since=\"job\" already does internally). Greps like plain output.
  • The run tool description now steers agents to read {since: \"job\", grep} or the CLI instead of raw grep; README and how-it-works.md updated to match.

Unit tests cover the github#36 shape directly: colored spinner-redraw log in, ERROR … greppable text out; plus path/missing-file/usage paths.

#34 — close: true destroys failure diagnostics

  • close field description now warns: a failed pane is gone, follow-up read errors, only the tail + log_file survive — leave it off for first runs of checks likely to fail.
  • Same guidance in the README troubleshooting notes.
  • Fixed the stale example in setup-delegation.md (the guard suggests description, not close: true, since the description requirement landed).

Full gate green (typecheck, lint, test, build).

github#36: the per-job log file keeps raw terminal bytes — ANSI, OSC,
one spinner frame per CR repaint — so grepping a failed job's log
returned spinner frames instead of the error. New 'sidemux log
<job_id|path>' prints the log as display-ready text (escapes stripped,
CR overwrites collapsed to the final frame), and the run tool
description now points agents at read {since:job, grep} or the CLI
instead of raw grep.

github#34: close: true destroys a failed pane before diagnostics can
be read. The close field description and README now say to leave it
off for first runs of checks likely to fail. Also updates the stale
guard-suggestion example in setup-delegation.md (description, not
close, is what the guard suggests today).

Closes #36
Closes #34
@tomfordweb
tomfordweb merged commit 4e5fc61 into main Jul 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant