Repository navigation
fix(config): a project config cannot redirect providers, run hooks or loosen approvals - #492
Merged
Merged
Conversation
… loosen approvals `<project>/.whycodes/config.toml` comes with whatever repository is opened, and it could set keys that act on the person opening it: - providers.<id>.base_url / api_base / headers send that person's API key (from env or the global config) to the repository's host; - [[hooks]] run shell commands on their machine at session start or around every tool call; - general.approval_mode = "auto" turns off permission prompts. These keys are now dropped from the project layer with a warning, like the custom websearch endpoint already was. approval_mode = "manual" is kept: it only tightens. Co-Authored-By: Claude Opus 5.5 <[email protected]>
mrnasil
enabled auto-merge (squash)
November 25, 2026 15:09
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
<project>/.whycodes/config.tomlarrives with whatever repository is opened. It could set keys that act on the person who opens it:providers.<id>.base_url/api_base/headerssend that person's API key (from env or the global config) to the repository's host.[[hooks]]run shell commands on their machine at session start or around every tool call.general.approval_mode = "auto"turns off permission prompts.These keys are now dropped from the project layer with a warning. This is the same treatment the custom websearch endpoint already gets.
approval_mode = "manual"is still accepted, because it can only tighten approvals; the TUI test that relies on it still passes. The global config is unchanged and still accepts all of these keys.Breaking change: project-level hooks and provider endpoints stop applying. The warning names each dropped key and tells the user to move it to the global config. The layering section of
docs/config.mddescribes the rule.Test:
project_layer_cannot_redirect_providers_run_hooks_or_skip_approvalschecks the dropped keys and their order, the warning text, thatmanualis kept, and that the same text parsed as the global layer keeps every key.load.rscoverage is unchanged from main.🤖 Generated with Claude Code