Conversation
Merge pull request #322 from slowdini/dev
A plan-mode dispatch relied entirely on the harness's own planning prompt to decide what the agent wrote, so what came back varied by harness and a planning phase that presented nothing produced no artifact at all. Instructing the agent to write `plan.md` cannot fix that: plan mode refuses writes into the task environment by design. The agent's final message is the one channel every harness has, so eval-magic now asks for the plan there. `src/cli/run/plan_prompt.rs` adds harness-neutral planning instructions to the dispatch prompt — read but do not edit, close the turn with the complete plan — and `PlanSignal::FinalMessage` takes that message as the plan when no plan file was written and no responder was declared. Every planning phase therefore produces `outputs/plan.md`, and no eval needs a responder to reach one: the preflight that required one on a harness without `[plan_mode.plan_file]` is gone. `plan_mode` becomes tri-state. `true` and `"plan_then_act"` keep the existing plan-approve-implement shape; `"plan_only"` stops at the plan, recording no `approved_in_round` and dispatching no act round, for a skill that only shapes how a plan is written. `false` and `true` serialize exactly as before, so no existing evals.json or dispatch.json changes. `plan_source` is the mirror: it names a plan written beforehand under the skill's `evals/` directory and splices it into the prompt as already approved. The session is ordinary act mode, so it works on Codex and Cline too, neither of which can declare `[plan_mode]`. `ConversationStopReason::PlanNotPresented` is retained for reading older artifacts but is no longer produced. Verification: cargo fmt --check, cargo clippy --all-targets -- -D warnings, and cargo test all pass (1509 tests). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ERLJRvxDfHdKHdXMyBLmse
feat(run): guarantee a plan artifact and add the two plan run shapes
slowdini
added a commit
that referenced
this pull request
Sep 15, 2026
Merge pull request #326 from slowdini/dev
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release notes
Highlights
message — the one channel every harness has — so every planning phase produces
outputs/plan.md, and no eval needs a responder declared to reach one.Behavior changes to know about
plan_modeis tri-state:trueand"plan_then_act"keep the existingplan-approve-implement shape;
"plan_only"stops at the plan, recording noapproved_in_roundand dispatching no act round;falseis unchanged. Existingevals.json/dispatch.jsonserialize exactly as before.plan_sourcenames a plan written beforehand under the skill'sevals/directory andsplices it into the prompt as already approved. The session is ordinary act mode, so it
works on Codex and Cline too, neither of which can declare
[plan_mode].[plan_mode.plan_file]isgone.
ConversationStopReason::PlanNotPresentedis retained for reading older artifacts but isno longer produced.
Fixes
back varied by harness. Cause: the dispatch relied entirely on the harness's own planning
prompt to decide what the agent wrote, and plan mode refuses writes into the task
environment by design — instructing the agent to write
plan.mdcouldn't fix that.Internal changes
plan_modeand the plan-artifact guarantee(
conversation.schema.json,evals.schema.json,run-record.schema.json); docs andharness template updated to match (
docs byoh,docs conversations, BYOHtemplate.toml).