Skip to content

fix(vibe): skip approval-policy subagent names and drop keys Vibe ignores on agent profiles - #3960

Merged
dyoshikawa merged 3 commits into
mainfrom
resolve-issue-3957-vibe-approval-policy-names
Nov 25, 2026
Merged

dyoshikawa merged 3 commits into
mainfrom
resolve-issue-3957-vibe-approval-policy-names

Conversation

@dyoshikawa

@dyoshikawa dyoshikawa commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

Follows Mistral Vibe v3.1.4, which separates agents from approval policies, for the vibe subagent target (.vibe/agents/*.toml, both project and global scope).

What changed

  • Approval-policy names are skipped. A subagent whose file stem is ask, accept-edits, smart-approve or auto-approve is now skipped with a warning, as main already is. In v3.1.5 AgentRegistry._discover never loads such a file as an agent. A project copy is ignored with approval_policy.project_override_ignored, and a ~/.vibe/agents/ copy redefines that approval policy for every session. The stem is compared exactly, the same way Vibe compares it (agent.name in BUILTIN_APPROVAL_POLICIES), so Ask.md is still written as an agent.
  • Approval-policy override files are left alone. A .vibe/agents/ file with one of those four stems is not imported as a subagent; it is skipped with a warning. generate --delete does not delete it either (isFileOwned / isDeletable()). In ~/.vibe/agents/ such a file is the user's policy override, and deleting a narrowing override would fall back to the broader builtin. isFileOwned now also receives forDeletion and logger from the processor.
  • Keys Vibe ignores on agent_type = "agent" profiles are dropped with a warning. This mirrors _agent_settings / session_layer_overrides in v3.1.5 vibe/core/agents/models.py and registry.py. Dropped: safety, approval_policy, and every VibeConfigSchema field outside _AGENT_KEYS (e.g. bypass_tool_permissions, enabled_agents, enable_auto_approve). Per tool, anything but default_timeout, max_timeout_seconds and a narrowing permission of ask/never is dropped, so permission = "always" and a tool allowlist go. Unknown keys are kept, as Vibe keeps them, so a typo is still reported. A legacy base_disabled list is folded into disabled_tools, as migrate_agent_profile_config does. agent_type = "subagent" profiles and vibe-plugin agents are unchanged.
  • Updated the Vibe subagent note in docs/reference/file-formats.md (and regenerated src/generated/docs-content.ts). It now says that permissions belong to default_approval_policy and [tools.*] in config.toml.
  • Added unit tests for both behaviors, covering project and global scope.

Skipped

  • The optional global-scope opt-in for writing an approval-policy override is not implemented. Overriding a policy is a different feature from a subagent, and the warning points users at editing ~/.vibe/agents/<policy>.toml by hand.
  • The issue suggests comparing policy names case-insensitively. That was not done because Vibe matches them exactly, and a case-insensitive check would skip agents Vibe loads.

Closes #3957

🤖 Generated with Claude Code

https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4

dyoshikawa and others added 3 commits November 25, 2026 10:31
…ores on agent profiles

Vibe v3.1.4 separates agents from approval policies. A file in an agents
directory named ask, accept-edits, smart-approve or auto-approve is never
loaded as an agent: a project copy is ignored with a config issue and a
~/.vibe/agents/ copy redefines that approval policy. Such subagents are
now skipped with a warning, in both scopes, like `main`.

A custom agent_type = "agent" profile can no longer decide what runs
without asking, so Vibe ignores safety, bypass_tool_permissions, keys
outside its agent key set, and per-tool settings other than the shell
timeouts and a narrowing ask/never permission. Rulesync now drops those
keys from agent profiles with a warning; subagent profiles are unchanged.

Closes #3957

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…ores

- Never import or delete .vibe/agents/{ask,accept-edits,smart-approve,auto-approve}.toml:
  in ~/.vibe/agents/ they are the user's policy overrides, and deleting a narrowing
  one would fall back to the broader builtin. Import skips them with a warning.
- On agent_type = "agent" profiles, drop only what Vibe's _agent_settings ignores
  (VibeConfigSchema fields outside _AGENT_KEYS, safety, approval_policy) and keep
  unknown keys, so a typo is still reported. Fold legacy base_disabled into
  disabled_tools as migrate_agent_profile_config does.
- Reword the warning to match what Vibe reports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…be-approval-policy-names

# Conflicts:
#	src/generated/docs-content.ts
@dyoshikawa
dyoshikawa merged commit f4ab820 into main Nov 25, 2026
10 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-3957-vibe-approval-policy-names branch November 25, 2026 02:24
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.

Follow up Vibe Code upstream updates: approval-policy agent names, agent-ignored keys (v3.1.4)

1 participant