Ask the human without stopping work. Use Cactus to park a decision, request approval for a command, announce a default that can be redirected, or keep a review or plan on the human's board. Do not use it when the answer is required immediately and no safe default exists.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Cactus?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/eighteyes-cactus)
---
name: cactus
description: Ask the human without stopping work. Use Cactus to park a decision, request approval for a command, announce a default that can be redirected, or keep a review or plan on the human's board. Do not use it when the answer is required immediately and no safe default exists.
---
# Cactus for Codex
Cactus is a durable SQLite inbox. Post a row, continue useful work, and act
when the user answers. Read `cactus --agent-help` once per session for the
full CLI reference.
## Mod mode: identity and waiting
The bundled hooks use Codex's hook-event `session_id` as the Cactus owner.
Use the `AGENT` value injected at session start on every `ask`, `edit`, and
`clear`; do not replace it with a terminal pane id.
While this plugin is loaded, its hooks inject this workflow into each Codex
turn. Codex has no native live plugin pane and no API for a hook to start an
idle session. The nearest equivalent is the `UserPromptSubmit` frontier: it
refreshes this session's inbox on the next user turn, includes each latest
answer in full, and clears answered/skipped non-persistent rows. If the
session is running in Herdr, the session-start hook also registers its
optional Herdr delivery route, which can wake that external session.
`cactus ask` and `cactus run` wait for the human by default, which blocks
Codex. Post with `--no-wait`; never arm a background monitor or waiter. When
the very next step needs an answer, block in the foreground under Codex's
shell limit:
cactus get KEY --wait --timeout 300 --json
Do not arm a monitor or a `--once` waiter: one that exits while the session
is idle wakes nobody.
## Required workflow
1. Post every later decision as `cactus ask ... --no-wait --agent "$AGENT"`, with
`--situation` (what is going on, why now), `--if-skipped` (what you do with
no answer), each `-c` as `LABEL: what happens, what it costs`, and
`-f PATH` for each file the question is about.
2. Prefer `--act steer --chosen` when a safe default lets work continue.
3. Use `cactus run CMD --no-wait --agent "$AGENT" --why ...` for a command awaiting
approval; `--why` says what the command does in plain words, then why; after approval, read the row result before running anything.
A command with quotes or more than one line: `cactus run - --no-wait --agent "$AGENT"`
with a quoted `<<'EOF'` heredoc; `-` reads the command from stdin verbatim.
4. On `answered`, `elaborate`, `reopened`, or `cleared`, re-read the row and
act on the new state.
5. Read a review or plan row with `cactus get KEY --agent "$AGENT"`: that read
tells the human you heard their verdict. After a verdict on your own plan or review row: if the work it tracked is done, close it with `cactus clear KEY --agent "$AGENT"`; if you need another verdict, respond with `cactus plan|review|edit KEY --agent "$AGENT"` (that puts the card back on the human's board); otherwise read it with `cactus get KEY --agent "$AGENT"` and leave it parked. A plan verdict `approve` means go ahead with the plan.
6. Clear your own row after acting.
### Several questions in one call
`cactus ask` posts several questions in one call. It checks every question
first and posts all or none; the keys print one per line, in order. Flags
given once (`--agent`, `-t`, `-p`, the wait flags) apply to all.
Use `--next` for two or three short questions. Each question after it takes
its own flags:
cactus ask "First question?" --agent "$AGENT" -t topic --no-wait \
--situation "..." -c "a: ..." -c "b: ..." --recommend a --confidence med --if-skipped "..." \
--next "Second question?" --situation "..." -c "x: ..." -c "y: ..." --no-recommend --if-skipped "..."
Use JSON when text holds quotes, `$` or line breaks, or there are many
questions. A quoted heredoc needs no shell escaping. Field names are the long
flag names with underscores; `defaults` apply to every question; `@1` names
the first question of the batch as a parent or edge target:
cactus ask --batch - --agent "$AGENT" --no-wait <<'EOF'
{"defaults": {"thread": "topic", "situation": "..."},
"questions": [
{"text": "First question?", "choices": ["a: ...", "b: ..."], "recommend": "a", "confidence": "med", "if_skipped": "..."},
{"text": "Second question?", "choices": ["x: ...", "y: ..."], "no_recommend": true, "if_skipped": "...", "parent": "@1"}
]}
EOF
`cactus ask --batch FILE` reads the same JSON from a file. Both forms are one
plain call. `cactus --agent-help`
documents both.
When an elaborate instruction asks to decompose a complex row, post several
smaller, independently answerable follow-ups with `-p ORIGINAL_KEY`, then
clear the original row. Do not edit it back into one question.
Use 3-5 mutually exclusive directions (`-c` each), the recommend marked; a 2-choice row is a confirm, post it `--confirm`; put the real trade-off in each
choice's description. Add `--recommend LABEL --confidence low|med|high` when you have a
preference. Do not use a generic chat question for a decision Cactus can hold.
Format a question for an 80-column terminal: two or three rendered lines are
fine, but no more. Cactus warns after an ask or edit that wraps past three
lines; decompose a larger decision into follow-ups. Hard-wrap choice
descriptions at 80 columns and keep choice labels short.
### Writing the question
The human answers from the card alone and remembers nothing of your session. A
longer card beats a short one that needs outside knowledge.
1. **Situation.** `--situation`: one or two sentences. What is going on, and
why a decision is needed now. Required on an ask.
2. **If skipped.** `--if-skipped`: what you do if the human gives no answer.
Required on an ask.
3. **Choices carry their meaning.** Every `-c` is `label: description`: what
happens if picked, what it costs. Put each `+ ` pro and `- ` con on its own
line inside the description. Nothing about a choice lives only in
`--context`. A choice with no description is refused.
4. **Explain names.** Link every id or coined name through `--refs` (the card
shows its definition), or give it plain words at first use: "the archive
inventory agent (pane p1)".
A term agreed in the project glossary (`.ai/gloss/glossary.json`) attaches
with its meaning by itself; write it exactly as the glossary does.
5. **Context is for extra facts.** Numbers, what you tried, what you ruled
out. Leave out timestamps, pane ids and status lines unless they change
which choice is right. Never restate the question, the situation or the
default there.
6. **Whitespace.** One idea per line or bullet. A blank line between parts.
No paragraph longer than three lines.
7. **Length is fine.** Add the fact the human would otherwise have to
remember.
8. **The row outlives your session.** Your session can drop before the
answer arrives, and another agent then picks the row up with none of your
memory. Write so that agent can act on the answer from the row alone:
- each choice says what you will do if it is picked, not only what it means
- `-f` every file the work lives in: the plan, the spec, the files to change
- say where the work stands and where it lives: the branch, the worktree,
the last finished step
- `--refs` and `-p PARENT` for the decisions this one rests on
- no "as discussed", "the earlier option", "my draft": name the thing
`cactus ask` refuses an ask row without `--situation` or `--if-skipped`, and a
choice with no description on a row with 2+ choices that is not a confirm.
`steer`, `run`, `notify`, `review`, `plan` and `data` rows are exempt.
Example:
cactus ask "The archive inventory agent finished. How do I save its work before closing it?" \
--agent "$AGENT" \
--situation "The agent that catalogued the archive drive (pane p1) is done. Its folder has no git repository, so nothing it wrote is saved anywhere but disk." \
-c "lean: Start a repository and commit the scripts and notes.
+ small, quick to clone
- the 2.7 GB of manifests stay uncommitted" \
-c "all: Start a repository and commit everything.
+ nothing left out
- a 2.7 GB first commit" \
-c "none: Close the agent and leave the files on disk.
- no history, no backup" \
--recommend lean --confidence med --why "The manifests can be rebuilt from the drive." \
--if-skipped "I do lean."
A description may span lines. A line starting `+ ` is a pro, `- ` a con; the
rest is the summary. The card shows them as green and red marks under the choice.
A review's or plan's notes may stay short markdown: `-` bullets, one fact
each, a blank line between blocks, hard-wrapped at 80 columns.
Name things by what they are, not by number. Cite a row (`q12`) or PR (`#40`)
only when the human must open it to decide.
`-f PATH` attaches a file. Attach every file the question is about: the plan,
spec, diff, config, or draft the human would otherwise have to go find. They
open it from the card with `f` (view) or `F` (edit), or preview it inline
with `o` (a diff vs git HEAD when changed). Repeat for more;
`edit -f` replaces the list. A row about a file with no `-f` is a row the
human answers blind.
The `UserPromptSubmit` hook injects your outstanding frontier. The `Stop` hook
never blocks. The `PermissionRequest`
hook converts an approval-needed Bash command into a Cactus run row and denies
the transient request so the durable inbox remains the approval surface.
A command that itself posts to cactus (`ask`, `run`, `plan`, `review`, `edit`)
gets no row: re-post it as plain cactus calls, one per Bash command, no pipes,
`&&`, `;`, `$( )` or variables.
Set `--reversibility reversible|costly|irreversible` on every decision that is
costly or irreversible to undo (any row may carry one); your value beats the
classifier's guess. Add `--risk s|m|l` (s one file, m a feature or others
notice, l data loss, money, prod, public) when the blast radius matters.
`edit --reversibility ""` or `--risk ""` clears.
## Picking up a row whose session dropped
A row can outlive the session that asked it: asked, session drops, the human
answers, and no session is left to hear it. If you are handed such a row (a
key in your prompt, or an `orphan`, `dead` or `inactive` row at session
start), rebuild its context before you act. In order:
1. `cactus get KEY --json`: the question, situation, choices, the answer,
`if_skipped`, `files`, `refs`, `parent`, `thread`, and the asker's `cwd`.
2. Read every file in `files`. They hold the plan or spec the row is about.
3. `cactus list -t THREAD -s any`: the sibling decisions in the same thread,
with their answers. Follow `parent` upward the same way.
4. The decision record in `.ai/cactus/` (`qN-ID-*.md`) and any plan folder
under `.ai/plan/` named in the row.
5. `git log` and `git status` in the row's `cwd`: what the dead session
finished, and what it left loose.
6. `cactus brief KEY`: a summary rebuilt from the dead session's transcript,
when one still exists.
Then take the row: `cactus adopt KEY --agent "$AGENT"`. Act on the answer, or
on `if_skipped` when it was skipped. If the steps above do not tell you what
the dead session meant to do with this answer, do not guess: post a new ask
with `-p KEY` that says what is missing.
## Asking well
Rules from 3,062 answered rows across 50 projects.
- Give 3-5 directions per ask, the recommend marked; a 2-choice row is a
confirm, post it `--confirm`. The human takes your recommendation 79% of the
time at 2 options, 67% at 3, 51% at 4+.
- Always recommend, with an honest confidence. High is followed 79%, med 71%,
low 59%.
- When options can combine, offer "both" or "all", or use `--multi`. The
human often widens scope.
- Keep progress polls ("when does it land?") and "what did you mean?" off the
board; those are the real declines. Use chat, `notify`, or `steer`.
- Pick names yourself and post them as a `steer`. Naming is the most-skipped
topic.
- A text-only review verdict is a fail: fix what it names. Test keys, arrows
and layout stability yourself before asking for a review.
- A digit typed as free text ("3") means that option.