Skip to content

Hand offs

thisisnsh edited this page Aug 20, 2026 · 1 revision

Hand-offs

s submits the review — every line comment, every direct edit and the plan-wide note, at once — and then asks what happens to the plan next.

The six exits

Row What it does
Revise using custom command Runs your own revise command with the skill invocation appended
Execute using custom command Runs your own execute command the same way
Revise plan in the session that wrote it Resumes that Codex or Claude Code session, with your feedback
Execute plan in a new session Starts a fresh session on this exact version
Copy revise command for agent Puts /planx revise <id> on the clipboard
Copy execute skill for agent Puts /planx execute <id> v<n> on the clipboard

Your own commands come first, so a reviewer who set one gets it at 1.

The two copy rows are the skill invocation, not a launch line: they are for pasting into an agent that is already running, where the binary and its flags are the wrong half of the command. The rows above them are terminal launch lines, and you can edit one before pressing enter.

Which rows appear

A row PlanX cannot make work is not offered, rather than being a keystroke that fails.

  • Revising needs a recorded session id. A version captured without one has nothing to resume.
  • Both built-in rows need an agent PlanX can launch — claude or codex. Anything else is a shell in between, and PlanX will not guess at it.
  • Revising also needs something to revise. Without a comment, an edit or a note there is no request to send, so both revise rows are absent on an empty review. Execute stays.
  • Your own commands answer to less. They depend on neither the recorded agent, the recorded argv nor the session id, because a command you wrote is a command PlanX can run. They survive a version PlanX can start nothing for.

A version with nothing startable still gets one row — Copy reopen command, planx <id> v<n> — because the way back into the review is a command too, and a list you cannot answer is not a question.

What the launch replays

Resuming a session restores the conversation, not the terminal it was typed into. A tab started with --model opus --add-dir ../shared would come back with neither, which is a different agent with the same memory. So PlanX records the launch line alongside the session id and replays it verbatim.

Two kinds of flag are dropped: the ones naming a session (--resume, -r, --continue, -c, --session-id, --fork-session), because they would collide with the selector PlanX is adding, and the trailing prompt, because the new one is the point of the launch.

The whole command is printed before anything runs, flags included, so what was started and what it was granted is on the scrollback above the agent's first frame. Replay re-grants whatever the tab was granted — visibly, not silently.

Revising resumes the session rather than forking it. A fork carries the same messages under a new id, which leaves the plan's history in a session nobody opens again and the revision in a session that has no name.

What planx execute does

The receiving agent runs it before its first edit:

planx execute <plan-id> v<n> --session-id "$CLAUDE_CODE_SESSION_ID"

One command, two halves. It returns the plan verbatim, every comment, every line you rewrote and anything still unaddressed, closing on the instruction to build rather than to revise. And it marks that version as the one that was built, which is what turns its row green in the picker and what makes ctrl+r work later.

The mark comes from the agent rather than from the launch, because a launch you immediately ctrl+c out of built nothing. That makes it true whichever route reached the build — the agent PlanX started, a command you pasted by hand, or /planx execute typed from scratch.

Flag Meaning
--session-id ID The session doing the building, so ctrl+r can resume it
--agent NAME Which agent that is, when the process walk cannot say
--no-mark Print the hand-off without recording a build

Running it twice restamps the time rather than failing, and a second run naming no session keeps the one already stored.

--no-mark exists because merging the read into the mark makes looking a write. It is the only way to see the payload without turning a picker row green.

The receiving agent needs the skill

An agent that does not have the PlanX skill installed will not know what /planx execute <id> v<n> means. Beyond that it needs nothing — not the planning conversation, not the chat history, only the skill and the version number.

Clone this wiki locally