Skip to content

fix: auto-approve settings not persisting in Settings UI#5938

Closed
Githubguy132010 wants to merge 3 commits intoKilo-Org:mainfrom
Githubguy132010:fix/auto-approve-settings-persist
Closed

fix: auto-approve settings not persisting in Settings UI#5938
Githubguy132010 wants to merge 3 commits intoKilo-Org:mainfrom
Githubguy132010:fix/auto-approve-settings-persist

Conversation

@Githubguy132010
Copy link
Contributor

@Githubguy132010 Githubguy132010 commented Feb 17, 2026

Context

fixes #5934 and fixes #3074

Auto-approve settings configured in the Settings UI were not being persisted to the backend. When users toggle auto-approve options in the Settings page, the toggles visually show as enabled but the settings are not actually saved, causing commands to still require manual approval.

Implementation

The issue was in webview-ui/src/components/settings/AutoApproveSettings.tsx - the component only updated local React state via setCachedStateField() but was missing the vscode.postMessage() calls to persist settings to the VS Code backend.

Added vscode.postMessage({ type: "updateSettings", updatedSettings: { ... } }) calls to all toggle handlers, following the pattern already used in AutoApproveMenu.tsx:

  • showAutoApproveMenu checkbox
  • AutoApproveToggle onToggle handler (covers all auto-approve toggles)
  • MaxLimitInputs handlers for allowedMaxRequests and allowedMaxCost
  • alwaysAllowReadOnlyOutsideWorkspace checkbox
  • alwaysAllowWriteOutsideWorkspace checkbox
  • alwaysAllowWriteProtected checkbox
  • followupAutoApproveTimeoutMs slider
  • yoloMode checkbox

Screenshots

N/A - No visual changes, only fixes persistence behavior.

How to Test

  1. Open Kilo Code extension Settings
  2. Navigate to Auto-approve section
  3. Enable any auto-approve toggle (e.g., "Automatically approve read operations")
  4. Restart the extension or start a new task
  5. Verify the setting is still enabled and commands are automatically approved without manual confirmation

Get in Touch

thomas07374

Fixes Kilo-Org#5934

The AutoApproveSettings component was only updating local React state
but not persisting settings to the VS Code backend. Added missing
vscode.postMessage calls to all toggle handlers.
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2026

🦋 Changeset detected

Latest commit: d30eed9

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

This PR includes changesets to release 1 package
Name Type
kilo-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

@kevinvandijk
Copy link
Contributor

Hi there, the behavior as described is actually intended to be that way. The settings will be persisted once you hit Save in the settings dialog. When you toggle a setting and exit the settings dialog it will ask you if you want to discard the changes you made or not.

@Githubguy132010 Githubguy132010 deleted the fix/auto-approve-settings-persist branch February 22, 2026 16:46
@coolbirdzik
Copy link

image Still happen in MacOS

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.

Auto-approve will not applying settings Auto-approve settings not being applied (Settings UI toggles don't persist)

3 participants