keep going
A Stop hook for Codex, Claude Code, Muse Code, Ghost, Grok, Cursor CLI, GitHub
Copilot CLI, and Antigravity, and a native plugin for Pi, Oh My Pi, and
OpenCode, that tells the agent to keep going when work remains.
Jarred Sumner's input, through a day and a half of Claude subagents chasing the
Riemann hypothesis, was mostly variants of "keep going" and "believe in
yourself." This is that, on a hook.

How it works
When the agent tries to end a turn, a reviewer model sees the last assistant
message, the owner's request, the agent's message that request answers, and —
after a nudge, on Claude Code, Codex, and Pi — what the agent said when it was
nudged, all redacted and truncated. It answers:
CONTINUE — the agent stopped with work in hand: it announced a step and
did not take it, stopped partway, or asked permission for an obvious next
step. Answering the latest message is not necessarily finishing the request,
which may carry forward from earlier turns.
STOP — the request is done, the agent is blocked, it is waiting on
something only the owner can give (consent to deploy, publish, send, spend,
or delete, an answer only the owner has, or which reading of their words
they meant), or it is waiting on work already running that will report
back.
After a nudge, further progress can earn another; repeating the same promise
or an already-explained blocker does not. The carried-forward requests and
the previous nudge come from a reviewer prompt
Will Brown posted.
CONTINUE blocks the stop with a fixed line — "Keep going." and three
variations, rotated. The reviewer only decides; a reviewer that wrote its own
line ended up arguing with an agent that had read far more than it. The one
sentence it gives for its verdict goes to the audit log, never to the agent.
On Claude Code, whose stop lists the background work still running, a main
agent that stops beside running work is let through with no wait and no
review: it is woken when that work reports back.
Everything else lets the stop through: a missing binary, a timeout, an
unparseable verdict, a bare completion token (Done.) with no owner prompt to
weigh it against, or — on Claude Code, Codex, and Pi, which show where the
last nudge fell — a stop after a nudge with no tool call in between: the agent
weighed the nudge and holds.
At most 100 continuations per owner turn; past the cap the stop is accepted
unreviewed. The count is a tally per session and turn under
$XDG_STATE_HOME/keep-going (the ghost home for Ghost); Claude Code, whose
stop names no turn, counts from its transcript, and Pi from the session
branch. Subagents on Claude Code and Muse are reviewed on the same terms, each
with its own count, except that waiting on running work does not end a
subagent's turn: its stop ends its run, and nothing it waits on will wake it.
On Codex, Claude Code, and Grok a fresh main-agent stop waits fifteen seconds
first; an owner message landing in the transcript meanwhile lets the stop
through. The host's own writes, such as Claude Code recording the final
message after Stop fires, do not count.
Install
CLI hooks need Node.js 22+ and the host CLI (codex, claude, muse,
ghostd with hook-complete, grok, cursor-agent, copilot, agy,
or opencode). The Pi extension needs Pi 0.84.2+.
# Pi — then /reload or start a new session
pi install git:github.com/ferdousbhai/keep-going
# Codex — then start a new session
codex plugin marketplace add ferdousbhai/keep-going
codex plugin add keep-going@keep-going
# or, without the marketplace, a hook in ~/.codex/hooks.json:
npx --yes github:ferdousbhai/keep-going --codex
# Claude Code — Stop and SubagentStop
claude plugin marketplace add ferdousbhai/keep-going
claude plugin install keep-going@keep-going
# Oh My Pi — loads this package's omp extension, not Pi's
omp plugin install github:ferdousbhai/keep-going
# Muse Code, Ghost, Grok Build, Cursor CLI, Copilot CLI, Antigravity, OpenCode,
# or Claude Code without the plugin — macOS and other Linux
npx --yes github:ferdousbhai/keep-going --muse # --ghost, --grok, --cursor, --copilot, --agy, --opencode, --claude, --all
On Omarchy and other Arch Linux systems, install the signed package instead
and register hosts with its keep-going command:
curl -fsSLO https://github.com/ferdousbhai/keep-going/releases/download/v0.25.0/install.sh
echo "78caffc1c15657ffd583fb9a3eed860d47b20fc9432303ca8869e2b6757cab10 install.sh" | sha256sum -c && sudo bash install.sh
keep-going --ghost --claude --codex # as yourself; any host flags above
The second line runs the installer only if it is the file this page was
written for (its SHA-256), so nothing unchecked runs as root.