Repository navigation
feat(cli): add --yes-shell-commands and reflect shell output in --message mode - #6002
Open
zsicheng0214 wants to merge 1 commit into
Open
zsicheng0214 wants to merge 1 commit into
zsicheng0214 wants to merge 1 commit into
Conversation
zsicheng0214
force-pushed
the
feat/yes-shell-commands-and-message-reflection
branch
from
November 19, 2026 05:58
90e4ca3 to
e2dac99
Compare
zsicheng0214
marked this pull request as ready for review
November 19, 2026 06:10
This branch has not been deployed
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
Add an explicit opt-in
--yes-shell-commandsflag (defaultFalse) for sandboxed CI/benchmark environments, and reflect shell command output back to the model in--messagemode while resettingself.shell_commandsper reflection step.Root Cause & Reproduction
InputOutput.confirm_ask()(aider/io.py),--yes-alwaysintentionally evaluatesres = "n" if explicit_yes_required else "y", refusingRun shell command?prompts by default for interactive safety. However, there was no opt-in CLI flag allowing isolated Docker/CI automation to authorize shell command execution alongside--yes-always.Coder.run_one()/Coder.send_message()(aider/coders/base_coder.py),shared_output = self.run_shell_commands()appendedshared_outputtoself.cur_messageswithout settingself.reflected_message(unlikeauto_lintandauto_test), causing one-shot--messageinvocations to exit before the model could inspect the command output or apply follow-up edits. In addition,self.shell_commandswas only cleared once ininit_before_message()rather than before eachsend_message()step.Discovered via TraceTrial-Bench (arXiv:2610.32285).
Changes
aider/args.py,aider/main.py,aider/io.py: add--yes-shell-commands(defaultFalse), preserving--yes-always's existing default refusal when--yes-shell-commandsis not passed.aider/coders/base_coder.py: clearself.shell_commandsbefore eachsend_message()step inrun_one(), and setself.reflected_message = shared_output(bounded byself.max_reflections) whenyes_shell_commandsis enabled.tests/basic/test_yes_shell_commands.py: unit tests verifying default refusal, opt-in approval, output reflection, and per-step command list reset.