When may a compact job cut into a working turn? Pure: a screen and a row
in, a verdict out. compact performs what this decides.
A /goal coordinator can keep ONE turn alive for hours by looping on
100 s ss wait calls (friction 20261121180326-2ea1d54b), so a job that
waits for a turn boundary never sees one. Interrupting is the way out,
but a keystroke into a working turn can cut a commit, a ship land or a
kubectl apply in half. So the rule is narrow:
write-markers);read-only-markers) or no
tool runs at all (the model is thinking, the prompt is empty);How the interrupt is made is the caller's choice (:interrupt-via):
:force-send type /compact (Claude Code queues it: Queued · ctrl+x ctrl+s to send now), then C-x C-s. Measured on Claude Code
2.1.330: a running foreground Bash is moved to the
background, not killed, and the compaction starts at once.
:escape Esc (up to 3 tries) until the spinner is gone, then /compact
as usual (the raw-tmux recipe recycle-goal-pane.sh). Esc
kills the running tool call.
Stratum: Promote. No tmux, no clock.
When may a compact job cut into a working turn? Pure: a screen and a row
in, a verdict out. `compact` performs what this decides.
A /goal coordinator can keep ONE turn alive for hours by looping on
100 s `ss wait` calls (friction 20261121180326-2ea1d54b), so a job that
waits for a turn boundary never sees one. Interrupting is the way out,
but a keystroke into a working turn can cut a commit, a `ship land` or a
`kubectl apply` in half. So the rule is narrow:
* never while text stands at the prompt (someone's draft);
* never while the running tool reads as a WRITE (`write-markers`);
* under :auto, only on a pane whose /goal was active when the job began,
after it waited :interrupt-after-ms for rest, and only while the
running tool reads as a read-only wait (`read-only-markers`) or no
tool runs at all (the model is thinking, the prompt is empty);
* under true, the goal and wait gates are dropped and an unclassified
tool is accepted; the write and prompt gates still hold.
How the interrupt is made is the caller's choice (:interrupt-via):
:force-send type /compact (Claude Code queues it: `Queued · ctrl+x
ctrl+s to send now`), then C-x C-s. Measured on Claude Code
2.1.330: a running foreground Bash is moved to the
background, not killed, and the compaction starts at once.
:escape Esc (up to 3 tries) until the spinner is gone, then /compact
as usual (the raw-tmux recipe recycle-goal-pane.sh). Esc
kills the running tool call.
Stratum: Promote. No tmux, no clock.(mode-param x)The :interrupt option from a parameter: true, false or :auto (anything unrecognised is :auto, whose gates are the strictest that still act).
The :interrupt option from a parameter: true, false or :auto (anything unrecognised is :auto, whose gates are the strictest that still act).
Substrings (lower case) of a tool call that only waits or reads.
Substrings (lower case) of a tool call that only waits or reads.
(running-tool lines)The tool call still running on LINES (a pane capture, escapes kept or not),
as {:tool text :kind kw}; nil when none runs. It is the call above the LAST
⎿ Running… line over the prompt. A newer ● line under it is a call
the screen has not finished drawing: :unknown.
The tool call still running on LINES (a pane capture, escapes kept or not),
as {:tool text :kind kw}; nil when none runs. It is the call above the LAST
`⎿ Running…` line over the prompt. A newer `●` line under it is a call
the screen has not finished drawing: :unknown.(tool-kind text)How TEXT, a tool call as the screen shows it, reads: :write, :read-only or :unknown. A write wins any tie: misreading a write as a wait is the one mistake that matters.
How TEXT, a tool call as the screen shows it, reads: :write, :read-only or :unknown. A write wins any tie: misreading a write as a wait is the one mistake that matters.
(verdict {:keys [interrupt interrupt-after-ms]}
{:keys [row tool waited-ms goal-at-start?]})May the job interrupt now? OPTS: :interrupt (true | false | :auto) and
:interrupt-after-ms. FACTS: :row (the pane now), :tool (running-tool),
:waited-ms (since the job began to wait for rest), :goal-at-start? (its
/goal was active when the job began). {:interrupt? true :tool ...}, or
{:hold reason ...}: a hold is not final, the job reads again next poll.
May the job interrupt now? OPTS: :interrupt (true | false | :auto) and
:interrupt-after-ms. FACTS: :row (the pane now), :tool (`running-tool`),
:waited-ms (since the job began to wait for rest), :goal-at-start? (its
/goal was active when the job began). {:interrupt? true :tool ...}, or
{:hold reason ...}: a hold is not final, the job reads again next poll.(via-param x)The :interrupt-via option: :escape, else :force-send.
The :interrupt-via option: :escape, else :force-send.
Substrings (lower case) of a tool call that may be writing. Checked FIRST,
so a call that also looks like a wait (ship land ... wait_s) is a write.
Substrings (lower case) of a tool call that may be writing. Checked FIRST, so a call that also looks like a wait (`ship land ... wait_s`) is a write.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |