← ClaudeAtlas

session-debugginglisted

Use when observing or driving a live harness session's terminal from an agent — reading what a shell / TUI / REPL / claude session is showing, injecting keystrokes, running a shell command inside a live PTY, or diagnosing a worker that looks stuck or unresponsive (harness-cli session snapshot / send / exec).
on-keyday/agent-harness · ★ 1 · Code & Development · score 67
Install: claude install-skill on-keyday/agent-harness
# Debugging live sessions (snapshot / send / exec) ## Overview You have no TTY, so `session attach` is not for you (it splices a real local terminal to the remote PTY). The non-TTY trio gives you eyes and hands on any live interactive session: ```bash harness-cli session snapshot <id> # SEE the current screen (read-only) harness-cli session send -enter <id> <text> # TYPE keystrokes (co-write, no takeover) harness-cli session exec <id> <cmd>... # RUN one shell cmd, wait, get output + exit code ``` All three authenticate with your task ticket's `exec_attach` capability — no operator PSK. `snapshot` is a read-only `view` attach and never disturbs whoever is driving; `send`/`exec` co-write into the live PTY without taking over the human controller and without resizing. The human may be attached in parallel — that is expected. Get `<id>` from `harness-cli session ls` (interactive sessions) or `ls` (all tasks) — pipe it into a variable; never hand-type a 32-hex id. ## Choosing the tool - Foreground is a **POSIX shell** (bash/zsh/sh — incl. one reached over ssh or inside a netns) → **`exec`**: synchronous, greppable output, real exit code. - Foreground is **anything else** (TUI, REPL, claude, full-screen app) → **`send` + `snapshot` loop**. `exec` on a non-shell foreground finds no completion marker and times out with a diagnostic — that timeout is your signal to switch. - Target is a **claude worker you're coordinating** (tasks, corrections) → the