fix: fail headless coder-switch commands clearly - #5637
Open
ump45nose wants to merge 1 commit into
Open
Conversation
|
Live check on PR head 2eed4e2: --message currently excepts SwitchCoder and falls through to analytics "Completed --message" with a None exit. That is a silent success after a coder switch that never happened. This fail-loud path is the right shape: tool_error + exit 1 + a distinct analytics reason. The test (SwitchCoder(edit_format="ask") from Coder.run) pins the headless case. Collision: #5638 patches the same three lines with a different error string that interpolates the full --message. Prefer this wording (names the command class, not the payload). Do not merge both. I would take this one. |
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
--messagetriggers a coder-switching slash commandSwitchCoderpathWhy
The one-shot
--messagebranch swallowedSwitchCoder, reported a completed run, and returned success even though commands such as/ask,/model, and/architectwere not applied.Fixes #5623
Test
python -m pytest tests/basic/test_main.py::TestMain::test_message_coder_switch_returns_error -q