fix(soul): re-inject yolo reminder after context compaction#2003
Open
ahyangyi wants to merge 1 commit intoMoonshotAI:mainfrom
Open
fix(soul): re-inject yolo reminder after context compaction#2003ahyangyi wants to merge 1 commit intoMoonshotAI:mainfrom
ahyangyi wants to merge 1 commit intoMoonshotAI:mainfrom
Conversation
4f5294b to
1596f9a
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Contributor
Author
|
One of the tests is flaky and failed before rebasing. It seems to be unrelated to this PR, and I opened a separate PR to fix that test: #2008 . |
The YoloModeInjectionProvider uses a one-shot `_injected` flag to only emit the non-interactive-mode reminder on the first LLM step after yolo activates. After context compaction, the original reminder message is typically folded into the compaction summary (or dropped entirely), leaving the model without the explicit 'don't call AskUserQuestion, plan-mode toggles are auto-approved' guidance — even though yolo is still active on the approval runtime. Add an `on_context_compacted()` hook to DynamicInjectionProvider (default no-op) and override it in YoloModeInjectionProvider to clear the one-shot flag. KimiSoul.compact_context now notifies every provider after the compacted history is assembled, so the yolo reminder is re-injected on the next step while yolo remains on. PlanModeInjectionProvider is unaffected: it already self-heals by scanning history for prior reminders.
9aae53f to
2594434
Compare
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
N/A
Description
The YoloModeInjectionProvider uses a one-shot
_injectedflag to only emit the non-interactive-mode reminder on the first LLM step after yolo activates. After context compaction, the original reminder message is typically folded into the compaction summary (or dropped entirely), leaving the model without the explicit 'don't call AskUserQuestion, plan-mode toggles are auto-approved' guidance — even though yolo is still active on the approval runtime.Add an
on_context_compacted()hook to DynamicInjectionProvider (default no-op) and override it in YoloModeInjectionProvider to clear the one-shot flag. KimiSoul.compact_context now notifies every provider after the compacted history is assembled, so the yolo reminder is re-injected on the next step while yolo remains on.PlanModeInjectionProvider is unaffected: it already self-heals by scanning history for prior reminders.
Checklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.