From fdc9707272f5f733522b28149250f74c2bf76c9e Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Thu, 16 Apr 2026 22:05:16 +0200 Subject: [PATCH] doc: use offset file in predefined workflow script Replace manual wc -c pattern with server-maintained offset file. Document offset in help.md session file listing. Co-Authored-By: Claude Sonnet 4.6 --- doc/IDEAS.md | 2 +- doc/help.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/IDEAS.md b/doc/IDEAS.md index 4b459f5..4cf1d0a 100644 --- a/doc/IDEAS.md +++ b/doc/IDEAS.md @@ -84,10 +84,10 @@ echo "name=tester agent=tester cwd=$cwd" > s/new # Send a prompt to a session and return only the new output. send() { sid=$1; shift - offset=$(wc -c < s/$sid/chat) printf '%s' "$*" > s/$sid/prompt while [ "$(cat s/$sid/state)" = "idle" ]; do sleep 0.2; done while [ "$(cat s/$sid/state)" != "idle" ]; do sleep 1; done + offset=$(cat s/$sid/offset) tail -c +$((offset + 1)) s/$sid/chat } diff --git a/doc/help.md b/doc/help.md index 0dc407f..c6b4263 100644 --- a/doc/help.md +++ b/doc/help.md @@ -40,6 +40,7 @@ ollie/ agent active agent (r/w) backend active backend (r/w) chat conversation log (ro) + offset byte offset of chat EOF before last prompt submit (ro) ctl control (w) stop, kill, clear, compact, rn ctxsz context size (ro) cwd working directory (r/w)