Skip to content

fix: unify YOLO and Auto permission mode descriptions across surfaces - #1867

Merged
RealKai42 merged 6 commits into
mainfrom
kaiyi/sacramento
Jul 17, 2026
Merged

fix: unify YOLO and Auto permission mode descriptions across surfaces#1867
RealKai42 merged 6 commits into
mainfrom
kaiyi/sacramento

Conversation

@RealKai42

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — the problem is explained below.

Problem

Since the permission policy rework, both agent engines implement the same autonomy ladder: manual < yolo < auto. YOLO auto-approves regular tool calls but still asks — sensitive files, plan-exit reviews, user-configured ask rules, and the agent may still ask questions. Auto is the fully unattended mode: everything is approved automatically (including sensitive files and plan exits) and AskUserQuestion is denied outright.

User-facing copy drifted from that reality, mostly describing an older, inverted mental model in which YOLO "approves everything" and Auto is the milder "approve safe operations" mode. The TUI copy added in #1450 described YOLO as "AI decides which actions need your approval" — a mechanism that exists in neither engine (approval decisions are always made by the policy chain, never by the model). A user reading these descriptions could pick the wrong mode — e.g. choosing Auto believing it is the restrained option, when it is in fact the most permissive.

What changed

Unified every user-facing surface on one accurate wording: YOLO = auto-approve regular tool actions, but the agent may still ask questions; Auto = fully autonomous, the agent never asks.

  • TUI: /permission selector descriptions and option order (now manual → YOLO → Auto, matching escalating autonomy), /yolo and /auto toggle notices, slash command list descriptions, and the YOLO notice shown during session replay.
  • CLI: --yolo / --auto --help text.
  • Web: slash command list and mobile permission sheet (en/zh). The status panel wording was already correct and became the canonical phrasing.
  • ACP adapter: mode descriptions shown in IDE clients (display order kept — locked by PLAN D9).
  • VS Code extension: /afk renamed to /auto, with afk kept as a hidden alias (still accepted, never shown in the menu); toasts, the /yolo entry, and the kimi.yoloMode setting description corrected. The persisted vscode_legacy_approval metadata shape is untouched for session compatibility.
  • Docs (en/zh): default_permission_mode entry, startup-option tables (also added the previously missing --auto row), and the interaction guide's YOLO/Auto section rewritten.
  • Engines: the built-in MCP config skill no longer refers to auto mode by its old "afk" name (the model only knows manual/yolo/auto); a stale code comment listing the modes fixed.

Deliberately untouched: the afk_toggle telemetry event and the afk property in CLI session_started (analytics schema continuity), and legacy migration reading approval.afk (historical data format).

Verification: typecheck for kimi-code, kimi-web, acp-adapter, and the VS Code extension; test suites for the TUI (1620), CLI (478), acp-adapter (306), VS Code (288), and skill-related engine tests — all green.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works. (Updated the VS Code integration test covering the renamed slash command; the rest is copy-only change covered by existing suites.)
  • Ran gen-changesets skill, or this PR needs no changeset. (5 changesets included; docs-only and comment-only changes need none.)
  • Ran gen-docs skill, or this PR needs no doc update. (User docs are updated in this PR itself, en/zh in sync.)

@changeset-bot

changeset-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 29d8b3d

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 Jul 17, 2026

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

commit: 29d8b3d

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d1b1645c68

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/vscode/package.json
…oving them

The extension-level approval handler auto-approved every request when
legacy yolo/afk was on, silently swallowing the sensitive-file,
plan-review, and ask-rule prompts the engine yolo mode still sends.
Forward every request to the user and let the engine permission mode do
the auto-approving, matching TUI and web behavior.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 29d8b3d288

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

value: 'yolo',
label: 'YOLO',
description: 'AI decides which actions need your approval.',
description: 'Auto-approve tool actions, but the agent may still ask questions.',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clarify YOLO can still prompt for approvals

In YOLO mode, exceptional tool actions such as sensitive-file access, plan-exit review, and user-configured ask rules still surface approval prompts before the YOLO auto-approve fallback. Describing it here as auto-approving "tool actions" while only warning that the agent may ask questions can mislead users selecting the mode from this dialog; qualify this as regular tool actions and mention that some approval prompts can still appear.

Useful? React with 👍 / 👎.

@RealKai42
RealKai42 merged commit 3086e47 into main Jul 17, 2026
14 checks passed
@RealKai42
RealKai42 deleted the kaiyi/sacramento branch July 17, 2026 18:09
@github-actions github-actions Bot mentioned this pull request Jul 17, 2026
7723qqq pushed a commit to 7723qqq/kimi-code that referenced this pull request Jul 18, 2026
- feat(cli): run kimi web and TUI /web in foreground by default (MoonshotAI#1853)
- fix: unify YOLO and Auto permission mode descriptions (MoonshotAI#1867)
- Resolved conflicts: kept i18n translations, adopted upstream defaultForeground logic
- files: run.ts, web-alias.ts, web.ts (merged i18n + foreground semantics)
ywh114 pushed a commit to ywh114/kimi-code that referenced this pull request Jul 19, 2026
…MoonshotAI#1867)

* fix(tui): correct YOLO and Auto permission mode descriptions

* fix: unify YOLO and Auto permission mode descriptions across CLI, ACP, web, and docs

* docs: correct YOLO and Auto mode descriptions in the interaction guide

* fix: correct YOLO mode notices in session replay and vscode extension

* feat(vscode): rename /afk command to /auto, keeping afk as hidden alias

Also correct the stale 'afk' mode reference in the built-in MCP config
skill guidance of both agent engines.

* fix(vscode): forward engine approval requests instead of blanket-approving them

The extension-level approval handler auto-approved every request when
legacy yolo/afk was on, silently swallowing the sensitive-file,
plan-review, and ask-rule prompts the engine yolo mode still sends.
Forward every request to the user and let the engine permission mode do
the auto-approving, matching TUI and web behavior.
@wbxl2000 wbxl2000 mentioned this pull request Jul 20, 2026
5 tasks
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