Skip to content

feat(rpc): plan mode for RPC hosts - #60

Merged
yaacovcorcos merged 6 commits into
mainfrom
claude/plan-mode-20261113
Nov 14, 2026
Merged

yaacovcorcos merged 6 commits into
mainfrom
claude/plan-mode-20261113

Conversation

@yaacovcorcos

@yaacovcorcos yaacovcorcos commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

#59 is merged, so this is now based on main.

Oh My Pi plans only in its terminal and for ACP clients, so Scient Desktop could not offer plan mode for Scient Agent. A new RPC plan command gives a host the same flow.

What's new

  • plan command with op: "enter" | "exit" | "get".
  • In plan mode the agent reads and drafts a plan file but changes nothing else.
  • When it proposes the plan through xd://propose, a plan_proposed frame ({ title, planFilePath, markdown }) carries the plan for the host's plan card. Then a select request asks Approve or Refine while the tool call waits.
  • Only an explicit approval leaves plan mode; the same run then carries out the plan. Refine, a typed answer (sent to the model as feedback) or a cancelled question keeps planning.
  • An answer that arrives after plan mode was left never approves (generation counter).
  • A new, switched or forked conversation leaves plan mode, so an old proposal's answer can never touch the new conversation (found in Codex review; subprocess test).
  • No auto-approval for a host without a question surface, unlike ACP.
  • A plan_updated frame ({ enabled, planFilePath? }) reports every time plan mode turns on or off, including after an approval or a change of conversation, so the host can show whether the agent is planning.
  • Refine asks the host what should change (an input request) and gives the answer to the model as feedback. Without it, the model often proposed the same plan again in the same run (seen live). A cancelled question falls back to asking in the conversation.
  • Planning is refused while a goal is set. Hosts that never send plan are unaffected.
  • Owned code: src/scient/rpc-plan.ts; marked hooks in rpc-mode.ts, rpc-types.ts and wire/*. Clients regenerated in a separate (generated) commit.

Desktop: ScientFactory/scient-desktop#925 (plan mode, stacked on ScientFactory/scient-desktop#924 goal mode), and the composer chips PR on top of #925.

Checked

  • test/scient/rpc-plan.test.ts, prompt-cache.test.ts, rpc-prompt-result.test.ts: 26 pass; rpc-dictation.test.ts passed before the last two commits, which don't touch it. Divergence check: 37 commits, 8 generated, all accounted for. bun run check:ts and the divergence check pass.
  • Live in a Desktop dev app with this branch's binary: /plan Add a file plan-check.txt ... proposed a plan, Desktop showed the plan card and the Approve/Refine question, nothing was written before the answer, and Approve created the file in the same turn. Screenshots in reviews/scient-agent-next-20261111/build-all-20261113/agentmodes-shots/ in the ScientFactory workspace.

Platforms: no platform-specific code. Tested on macOS only; Windows and Linux are covered by CI.

Release: ships in the next Scient Agent release, held until #53 merges.

Scient-Divergence: SA-PLAN-MODE

🤖 Generated with Claude Code

yaacovcorcos and others added 6 commits November 14, 2026 20:35
Oh My Pi plans only in its terminal and for ACP clients, so Scient
Desktop could not offer plan mode for Scient Agent. A new plan command
(enter, exit, get) gives an RPC host the same flow. In plan mode the
agent reads and drafts a plan file but changes nothing else. When it
proposes the plan through xd://propose, a plan_proposed frame carries
the plan (for the host's plan card), and a select request asks Approve
or Refine while the tool call waits.

Only an explicit approval leaves plan mode; the same run then carries
out the plan. Refine, a typed answer (sent to the model as feedback) or
a cancelled question keeps planning. An answer that arrives after plan
mode was left never approves. Unlike ACP, there is no auto-approval for
a host without a question surface: a host that sends plan answers it.
Planning is refused while a goal is set. Hosts that do not send plan
are unaffected.

Scient-Divergence: SA-PLAN-MODE

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scient-Generator: rpc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A proposal still waiting for approval belonged to the old conversation.
After new_session or switch_session, approving it cleared plan mode in
the new conversation and recorded the old plan's approval there. A new,
switched or forked conversation now leaves plan mode, so the old answer
is refused like any answer after plan mode ended.

Scient-Divergence: SA-PLAN-MODE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Approving a plan, or changing conversation, leaves plan mode without
the host asking. A plan_updated frame ({ enabled, planFilePath? }) now
reports every change, so Scient Desktop can show whether the agent is
planning.

Scient-Divergence: SA-PLAN-MODE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scient-Generator: rpc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refine returned a tool result telling the model to stop and ask, but the
model often proposed the same plan again in the same run. Refine now asks
the host what should change (an input request) and gives the answer to
the model as feedback. A cancelled question falls back to asking in the
conversation.

Scient-Divergence: SA-PLAN-MODE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yaacovcorcos
yaacovcorcos force-pushed the claude/plan-mode-20261113 branch from 1417006 to 908038f Compare November 14, 2026 18:36
@yaacovcorcos
yaacovcorcos merged commit daae706 into main Nov 14, 2026
21 checks passed
@yaacovcorcos
yaacovcorcos deleted the claude/plan-mode-20261113 branch November 14, 2026 20:02
yaacovcorcos added a commit that referenced this pull request Nov 15, 2026
ChatGPT apps through the person's ChatGPT sign-in, with `apps --json` and the host command list in `--runtime-info` (#57). Hosts learn when the prompt cache expires (#59). Plan mode for RPC hosts (#60).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant