From 41711fe5733ddcc8b3633a59bbe993f090f8092c Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 5 Jun 2026 05:36:09 -0400 Subject: [PATCH] =?UTF-8?q?sandbox:=20PLAN=5FRUNNER=20=E2=80=94=20claude-s?= =?UTF-8?q?creen=20now=20auto-handles=20multi-line=20briefs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The single-line file-handoff is now built into claude-screen itself (it detects a newline in the piped prompt, stashes the brief to a tempfile, and pastes a pointer). So the doc just pipes the brief straight in; the manual "write to /tmp + echo a single line" dance is gone. Co-Authored-By: Claude Opus 4.7 --- sandbox/plans/PLAN_RUNNER.md | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/sandbox/plans/PLAN_RUNNER.md b/sandbox/plans/PLAN_RUNNER.md index 3b3e60c283be..319c66f83487 100644 --- a/sandbox/plans/PLAN_RUNNER.md +++ b/sandbox/plans/PLAN_RUNNER.md @@ -16,15 +16,13 @@ the window. One plan per session, sequentially. ## Steps -### 1. Write a brief to a tempfile +### 1. Write the brief The brief is the sub-session's whole instruction set: which plan to read, the locked decisions, hard rules, build steps, the exact tests/greps to run, and — -critically — to **write a STATUS marker file LAST**. - -``` -/tmp/-brief.md -``` +critically — to **write a STATUS marker file LAST**. Keep it in a file +(`/tmp/-brief.md`) or compose it inline — either way you pipe it on +stdin in the next step. Hard rules every brief repeats: - **Execute the plan with the `phx:work` skill** — step through the plan's @@ -38,12 +36,12 @@ Hard rules every brief repeats: ### 2. Spawn the session -Multi-line text piped to `claude-screen` does **not** land reliably (the TUI -submits mid-paste). Always pipe a **single line** pointing at the brief: +Pipe the brief straight in. `claude-screen` detects a multi-line prompt and +auto-stashes it to a tempfile, pasting a single-line `Read … and follow it` +pointer for you (a multi-line paste would otherwise submit mid-prompt): ```bash -echo "Read /tmp/-brief.md and follow every instruction in it exactly." \ - | ~/dev/claude-screen /home/paulus/dev/hass/core +~/dev/claude-screen /home/paulus/dev/hass/core < /tmp/-brief.md ``` Use an **unambiguous full ``** — `screen -p` matches by prefix, so a @@ -98,10 +96,9 @@ Then advance to the next plan. ## Gotchas (all bit at least once) -- **Single-line file-handoff only** — multi-line stdin to `claude-screen` is - unreliable. - **Confirm the prompt submitted** — a first-run banner can swallow it; send - `$'\r'` to nudge. + `$'\r'` to nudge. (`claude-screen` handles the multi-line→file stashing + itself, so you just pipe the brief.) - **`screen -p` is prefix-match** — use full, distinct window names. - **STATUS is written last** — its presence means done; nothing earlier does. - **Avoid git ops in the repo while a sub-session is mid-write** — index