Repository navigation
fix: keep the original baseline for temporary reasoning effort - #23
Open
BaconDroid wants to merge 1 commit into
Open
BaconDroid wants to merge 1 commit into
BaconDroid wants to merge 1 commit into
Conversation
BaconDroid
force-pushed
the
fix/reliable-temporary-resets
branch
from
October 19, 2026 16:21
02511a8 to
0c832c5
Compare
This was referenced Oct 19, 2026
Fix the temporary-reset baseline, read assistant-shaped messages, merge guidance into the first system prompt, and replace Zod config parsing with a small validator.
BaconDroid
force-pushed
the
fix/reliable-temporary-resets
branch
from
October 20, 2026 01:25
a8dae1a to
f622615
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.
Summary
Fixes two bugs in temporary overrides and removes redundant session reads from the tool path.
Temporary overrides could reset to the wrong level, or not reset at all. The reset baseline was resolved after the override was sent, so the plugin's own synthetic message became the new baseline:
lowthenhighin one turn reset tolowon idle instead of the level from before the turn.lowthenlowagain cleared the pending reset, making the temporary change permanent.The baseline is now read before the first override and kept in
state.resetuntil the change is persisted or a reset succeeds.A failed
session.messagescall crashed the tool.(await client.session.messages(...)).datawas used without checking.error, andresolveLatestModelInfo(undefined)then threw. Reproduced with a mocked client asTypeError: undefined is not an object (evaluating 'messages.length'). The tool now returns an error string instead.Changes
session.messagesread per tool call instead of two or three, bounded to the latest 20 messages.{ variant?, reset?: { level, agent, model? } }; the first reset target wins.system[0]instead of pushing a second system message. This incorporates the fix from fix: merge adaptive guidance into existing system prompt #21; credit to @zoomdbz.zoddependency. Bundle: 500.85 kB → 381.15 kB.Verification
pnpm verify(format, lint, typecheck, tests, build) passes on this branch.New regression coverage: repeated temporary changes with different and identical levels, reset retry after a failed idle prompt, message fetch failure, provider lookup failure, stale cached variant after a model switch, assistant-shaped messages, and merging into an existing system prompt.
Behavior is otherwise unchanged: config keys, tool name and arguments, persisted semantics, the 500-session LRU bound, and preservation of the calling agent and model.
Related: this fixes the reset path discussed in #22. #20 (automatic initial effort selection) is out of scope.