Repository navigation
fix(agent-core-v2): drop literal decision clauses from system prompt and auto reminder - #3894
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 002bf08 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
@codex review |
4 of 5 tasks
commit: |
7Sageer
force-pushed
the
prompt-decision-literalism
branch
from
September 18, 2026 07:59
5796f8d to
ea38c9a
Compare
…and auto reminder
7Sageer
force-pushed
the
prompt-decision-literalism
branch
from
September 18, 2026 08:16
ea38c9a to
002bf08
Compare
Merged
7723qqq
added a commit
to 7723qqq/kimi-code
that referenced
this pull request
Sep 19, 2026
… and auto reminder (MoonshotAI#3894) Two upstream text alignments: the 'Delivering work' paragraph loses its 'no less, no more, and nothing different' clause, and the auto-mode enter reminder's AskUserQuestion line becomes 'decide and continue'. The fork's AutoModeAskUserQuestionDeny message is fork-authored ('Auto mode cannot ask interactive questions') and stays as-is.
7723qqq
added a commit
to 7723qqq/kimi-code
that referenced
this pull request
Sep 19, 2026
All deltas since merge base 1b89e4b now carry verdicts: MoonshotAI#3885 and MoonshotAI#3894 ported, MoonshotAI#3896/MoonshotAI#3892/MoonshotAI#3887/MoonshotAI#3889 not-applicable (engine architecture differs structurally — reasoning in the allowlist), the remaining eight tracked as ROADMAP §6.1 items 22-28 with the prerequisite chain recorded (models.dev proxy, trace id capture, steer id design pass). Gate exits 0.
7723qqq
pushed a commit
to 7723qqq/kimi-code
that referenced
this pull request
Oct 5, 2026
Step 7 of the incremental sync to 2.1.1: 21 upstream commits over 263 files. 24 conflicts, concentrated in the provider/registry import path (api_key_env, registry import) and the media-read layer where the fork's inline media reading sits on top of upstream's ReadMediaFile guidance. Upstream's changes in this step, all absorbed: - Stop listing unavailable media tools in subagent menus and clarify Read errors for images and videos (MoonshotAI#3878) - Providers can read their API key from a named environment variable (api_key_env in config.toml or the provider API) (MoonshotAI#3762) - Keep follow-up messages sent during a turn from appearing twice after a session reload (MoonshotAI#3896) - Session index compaction on startup, faster CLI startup, faster session list and resume on large workspaces, and incremental background search indexing (MoonshotAI#3889) - Rename kimi install-app to kimi install-desktop, keeping the old name as a hidden alias (MoonshotAI#3864) - Restore thinking display for OpenAI-compatible providers that send a reasoning string next to an unrecognized reasoning_details array (MoonshotAI#3910) - Fix kimi -p exiting early and cancelling the active turn when a cron task fires (MoonshotAI#3875) - Drop literal decision clauses from the system prompt and the auto permission mode reminder (MoonshotAI#3894) - select_tools points out already-available tools to call directly and suggests announced names for near-miss selections (MoonshotAI#3885) - Fix deleting or archiving a session sometimes never finishing (MoonshotAI#3887) - Keep follow-up messages attached to their turn; undo the host turn instead of the follow-up alone (MoonshotAI#3891, MoonshotAI#3906) - Remove the system-prompt rule that forbade all file access outside the working directory (MoonshotAI#3879) - Stop workspace file watchers from scanning an unbounded project root; add [watch] enabled / KIMI_CODE_WATCH to disable watching (MoonshotAI#3892) Fork behaviour that had to survive: - the i18n layer: the registry-import and provider api_key_env strings went through `t()` with en/zh entries (providerApiKey, registryAuthRequired, providerAuthRequired, subtitleDefault, tokenLabel) - the fork's inline media reading in the read tool, kept over upstream's ReadMediaFile guidance - the provider/registry import path, where the fork's custom-registry flow and upstream's api_key_env support had to be reconciled The merge also drops the unused READ_MEDIA_FILE_TOOL_NAME constant that came in with this step (the fork reads media inline), keeping the lint gate green. Verified: typecheck clean across every package and app; full suite 17752 passed / 0 failed / 81 skipped / 1 todo; lint 0 errors.
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.
Related Issue
No tracking issue — this comes out of an A/B agent-harness benchmark analysis (details below in Problem). Happy to file/link one if a maintainer prefers.
Problem
Two literal decision clauses in the default agent context were being quoted verbatim by the model to justify wrong choices under ambiguity, observed repeatedly in an A/B benchmark where two agent harnesses ran the same model on the same task set:
Do what was asked — no less, no more … Leave out anything the ask does not call for.(system prompt, Delivering work) — in tasks whose wording was under-specified, the model cited this clause to reject industry-convention solutions as "not requested", then went off to build a heavier "literal" solution that the verifier did not accept. The same model in the other harness (without this clause) picked the conventional solution and passed.Make a reasonable decision and continue without asking the user.(auto permission mode reminder + the matching permission-policy denial text) — in an all-or-nothing task with undeclared external contracts (layout/format conventions), multiple failing runs cited this sentence at the exact decision point as license to gamble on a single contract and hard-code it, instead of writing convention-robust code. A passing run under the identical clause shows it is a probability amplifier, not a deterministic trap — but the license wording is what the model reached for when it gambled.The bar for a prompt clause should be: "when the model quotes it at an ambiguous decision point, is its advice always right?" These two fail that bar precisely where steering matters most. Meanwhile both clauses' functional cores are either redundant (the stated-goals sentence already covers "do what was asked") or must stay (the
AskUserQuestionban in auto mode — in headless runs a stalled question is worse than a wrong guess).What changed
system.md(Delivering work):Do what was asked — no less, no more, and nothing different. … Leave out anything the ask does not call for.→Do what was asked. Goals the user states explicitly count as part of the ask.Keeps the stated-goals主干, removes the literalism that was citable as a rejection license.permission-mode-auto-enter-reminder.md:Do NOT call AskUserQuestion while auto mode is active. Make a reasonable decision and continue without asking the user.→Do NOT call AskUserQuestion while auto mode is active; decide and continue.The functional ban stays; the "reasonable decision" license goes.auto-mode-ask-user-question-deny.ts: same wording alignment for the policy denial message shown when the model does callAskUserQuestionin auto mode.Deliberately not touched: neighboring clauses whose failures were one-off collisions (single case, with passing runs under the same clause), and no new clauses were added — steering text always lags the model, and every added line is a new thing the model can quote as a rejection license.
Checklist