Skip to content

fix: resolve conflict between "make changes" and "ask first" instructions in system prompt#462

Open
Bronya0 wants to merge 1 commit into
MoonshotAI:mainfrom
Bronya0:fix/system-prompt-conflict-clarify
Open

fix: resolve conflict between "make changes" and "ask first" instructions in system prompt#462
Bronya0 wants to merge 1 commit into
MoonshotAI:mainfrom
Bronya0:fix/system-prompt-conflict-clarify

Conversation

@Bronya0
Copy link
Copy Markdown

@Bronya0 Bronya0 commented Jun 5, 2026

Fixes #459

Problem

The system prompt (packages/agent-core/src/profile/default/system.md) contains conflicting instructions:

  • # Prompt and Tool Use section: "you MUST use the appropriate tools to make actual changes — do not just describe the solution in text"
  • # General Guidelines for Coding section: "Ask the user for clarification if there is anything unclear"

These two directives fight each other. The first uses strong language (MUST, do not just) that overrides the second, causing the agent to default to directly making changes without prior discussion.

Changes

Two minimal edits in packages/agent-core/src/profile/default/system.md:

Line 9: Added "when the requirements are clear" qualifier to "default to taking action with tools", so ambiguous situations are not automatically treated as tasks to execute immediately.

Line 11:

  • Removed the "MUST" / "do not just describe" wording that actively discourages discussion
  • Replaced with "rather than only describing" — same intent to encourage action, without suppressing the option to discuss first
  • Added "If the requirements are unclear or the approach is uncertain, discuss with the user first before making changes" directly in the same paragraph, so the agent reads both parts as one coherent instruction

Effect

Before: two separate sections giving contradictory orders, no priority → agent behavior is erratic.
After: one coherent statement: "do it, but if unclear, ask first" — with the "ask first" part in the same paragraph as the "do it" part, so neither can override the other.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 5, 2026

⚠️ No Changeset found

Latest commit: 01beaef

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Bronya0 Bronya0 force-pushed the fix/system-prompt-conflict-clarify branch from 6a07b60 to 68c7651 Compare June 5, 2026 06:14
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a07b60094

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/scripts/dev.mjs Outdated

// Suppress DEP0190 deprecation warning for shell+args in this dev script.
// The args are safe (hardcoded paths + CLI flags forwarded by the user).
process.removeAllListeners('warning');
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Filter the warning instead of removing listeners

On the repo's Node 24.15.0, process.removeAllListeners('warning'); spawn('echo', ['hi'], { shell: true }) still prints [DEP0190] to stderr because removing listeners leaves Node's default warning output in place. This means Windows pnpm dev still shows the warning this change is trying to suppress, while also discarding any warning handlers installed via preloads; add a targeted warning listener/filter or avoid shell:true instead.

Useful? React with 👍 / 👎.

Comment thread apps/kimi-code/scripts/dev.mjs Outdated
cwd: APP_ROOT,
env,
stdio: 'inherit',
shell: useShell,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid shelling out with forwarded CLI args

When pnpm dev runs on Windows, this shell: true path forwards cliArgs through the shell; Node's DEP0190 warning for child_process.spawn says these args are not escaped, only concatenated. Any prompt or flag value containing shell metacharacters such as &, |, or > is therefore interpreted by cmd.exe instead of being delivered literally to the CLI, which can corrupt normal dev invocations or execute an extra command copied into an argument; use a non-shell launch path for the .cmd wrapper or quote/escape the forwarded args.

Useful? React with 👍 / 👎.

…ions in system prompt

The system prompt at Prompt and Tool Use section contained conflicting
directives: 'MUST use tools to make actual changes — do not just describe'
vs 'Ask the user for clarification if anything is unclear' in the Coding
Guidelines section, with no priority defined.

Changes:
- Remove MUST/do-not-just-describe wording that overrides project AGENTS.md
- Add 'if unclear, discuss first' qualifier directly into the same paragraph
- Soften 'default to action' to 'default to action when requirements are clear'

Closes MoonshotAI#459
@Bronya0 Bronya0 force-pushed the fix/system-prompt-conflict-clarify branch from 68c7651 to 01beaef Compare June 5, 2026 06:14
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.

系统提示 system.md 内指令自相矛盾:MUST make actual changes vs Ask user for clarification

1 participant