MoonshotAI / MoonshotAI/kimi-cli

Feature Request: Granular Auto-Approval Rules (like Claude Code)

Open
#1,631 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
11.4k
Forks
1.3k
Avg merge
9h 47m
Merged PRs (30d)
2

Description

What feature would you like to see?

Currently, YOLO mode (default_yolo = true or /yolo command) is all-or-nothing:

  • OFF: Ask for approval on all non-readonly tool calls
  • ON: Auto-approve ALL tool calls

I would like granular auto-approval controls similar to what Claude Code offers, where I can:

  1. Auto-approve read-only commands (ReadFile, Glob, Grep, Shell read operations) while requiring confirmation for modifications
  2. Configure approval rules based on tool paths/arguments (e.g., auto-approve writes to certain directories but not others)

Proposed configuration (Granular, like Claude Code):

[auto_approval]
default = "ask" # "ask", "allow", "deny"

[[auto_approval.rules]]
tool = "WriteFile"
path = "/tmp/**"
action = "allow" # Auto-approve writes to /tmp

[[auto_approval.rules]]
tool = "WriteFile"
path = "**/*.md"
action = "ask" # Always ask before writing .md files

[[auto_approval.rules]]
tool = "Shell"
pattern = "git *"
action = "allow" # Auto-approve git commands

[[auto_approval.rules]]
tool = "Shell"
pattern = "rm *"
action = "ask" # Always ask before rm commands

Use case: When working on large projects, I need to explore many files (reading) without constant interruptions, but I want to be asked before any file modifications - especially in sensitive areas like production config files or outside the working directory.

This would provide a safer middle ground between the current binary YOLO on/off options.

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the current default_yolo configuration and /yolo command handling, then trace how tool approval decisions are made. Done means granular rules can distinguish read-only operations, paths or arguments, and allow, ask, or deny actions with coverage for the proposed cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.