Repository navigation
fix(cli): send the pinned mission system prompt to the provider - #410
Merged
Merged
Conversation
run_mission wrote the mission system prompt (MISSION_COMPLETE marker contract, todo discipline) into the session header but built the provider with tool specs only, so the model never saw it — on a fresh mission or on --resume. Build the provider through mission_provider, which applies storage.system_prompt() like the run/chat faces do. Co-Authored-By: Claude Opus 5.5 <[email protected]>
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
ajianaz
added a commit
that referenced
this pull request
Oct 18, 2026
Resolve mission.rs: keep the failover chain build and apply the pinned system prompt (from #410) to every link via configure_mission_provider. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
What
tole missionnow sends its pinned system prompt (base prompt + MISSION_COMPLETE marker contract + todo discipline) to the model, on fresh runs and on--resume.Why
Found by the cora 0.19 agent-mode full scan (MAJOR, confirmed; pre-existing on develop).
run_missionstored the system prompt in the session header viaJsonlStorage::create_with, but built the provider asOpenAiProvider::new(cfg).with_tool_specs(...)and never calledwith_system_prompt. The scan flagged--resume; reading the code, a fresh mission was affected too — only the first user message's short hint mentioned the marker, and a resumed mission lost even that.run/chatalready applystorage.system_prompt()(main.rs).Changes
mission.rs: newmission_provider(cfg, specs, &storage)appliesstorage.system_prompt()when present;run_missionuses it for both the fresh and the resumed path.Testing
mission_provider_sends_the_pinned_system_prompt_on_resume: creates a mission session with the realmission_prompt, then checks the request body for the freshly created storage and for the same file reopened viaJsonlStorage::open(the resume path) — the first message issystemand containsMISSION_COMPLETE_MARKER.cargo fmt --all,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspacegreen;cora review --staged: ✅ No issues found.🤖 Generated with Claude Code