Skip to content

feat(agent-core-v2): approve unanalyzable bash commands in yolo permission mode - #3869

Merged
sailist merged 1 commit into
MoonshotAI:mainfrom
sailist:feat-240-09-17-yolo-unanalyzable-bash-approve
Sep 17, 2026
Merged

sailist merged 1 commit into
MoonshotAI:mainfrom
sailist:feat-240-09-17-yolo-unanalyzable-bash-approve

Conversation

@sailist

@sailist sailist commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

N/A — internal change; see Problem below.

Problem

In Ask When Needed (yolo) permission mode, bash commands that cannot be statically analyzed — e.g. commands containing $VAR, unterminated quotes, or deeply nested shells — still trigger an approval prompt. This interrupts batch flows that the mode is designed to run automatically: users who choose Ask When Needed have already accepted auto-approval of routine commands, and Never Ask mode already skips the guard entirely.

What changed

  • The dangerous-command guard now asks in Ask When Needed mode only for commands positively identified as dangerous (shutdown, rm -rf, dd writing to devices, ...). Commands that cannot be statically analyzed fall through to the mode's auto-approval.
  • Always Ask (manual) mode behavior is unchanged: unanalyzable commands still ask, and everything else reaches the fallback ask policy as before. Never Ask mode is untouched.
  • Updated the existing yolo-mode unanalyzable test cases in place (no net test-count change); full agent-core-v2 suite passes (6728 tests); added a changeset.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: the issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 712cb8b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Sep 17, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@712cb8b
npx https://pkg.pr.new/@moonshot-ai/kimi-code@712cb8b

commit: 712cb8b

@sailist
sailist merged commit 86e0820 into MoonshotAI:main Sep 17, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant