fix(cli): strengthen Ask mode prompt with supersedes language#8320
Merged
markijbema merged 1 commit intoApr 9, 2026
Merged
Conversation
Address Issue C from the Ask Mode architecture analysis (#8319): the ask.txt prompt was only 10 lines with no explicit mode declaration or supersedes statement, making it easy for project-level AGENTS.md instructions to override the read-only constraints. Add a leading supersedes statement (matching the pattern used by Plan mode) and an additional guideline to ignore conflicting project configuration instructions.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by gpt-5.4-20260305 · 496,405 tokens |
alex-alecu
approved these changes
Apr 9, 2026
Contributor
|
@markijbema this looks like a good followup to #7929 |
jliounis
pushed a commit
to jliounis/kilocode
that referenced
this pull request
May 18, 2026
…-de00-4e83-bbb2-0b203e7ed84d fix(cli): strengthen Ask mode prompt with supersedes language
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.
Summary
ask.txtprompt lacked an explicit mode declaration and "supersedes" statement, making it vulnerable to being overridden by project-levelAGENTS.mdinstructionsContext
Research in #8319 identified that the Ask mode prompt (
ask.txt) was only 10 lines with no explicit "you are in Ask mode" declaration. Unlike Plan mode — which injects a prominent<system-reminder>block with "supersedes" language — Ask mode relied entirely on a short behavioral prompt that could be overwhelmed by 200+ lines of AGENTS.md instructions telling the model to write code and make changes.Changes
packages/opencode/src/agent/prompt/ask.txtcloses #8319