Repository navigation
feat(codewhale): document project MCP approval and add auto_review passthrough - #3978
Merged
dyoshikawa merged 2 commits intoNov 26, 2026
Merged
Conversation
…ssthrough Codewhale now loads a project .codewhale/mcp.json only after its exact bytes are approved with /mcp review and /mcp approve <digest>, and every change needs approving again. Document this and log a reminder when a project generate changes the file. Add a global-only codewhale.auto_review permissions override that replaces the [auto_review] table of ~/.codewhale/config.toml through the shared-config gateway, keeping [hooks] and every other key. Project mode skips it with a warning because Codewhale ignores a project-scope table; global import reads it back. Refs #3174 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…dewhale-mcp-approval-auto-review # Conflicts: # src/generated/docs-content.ts
dyoshikawa
deleted the
resolve-issue-3174-codewhale-mcp-approval-auto-review
branch
November 26, 2026 07:59
This was referenced Nov 26, 2026
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.
Summary
Follows up on the 2026-11-19 upstream re-check in #3174 with the two Codewhale gaps it found:
<workspace>/.codewhale/mcp.jsononly when the workspace is trusted and the exact bytes of the file have been approved with/mcp review+/mcp approve <digest>. Any later change, a regeneration included, loads none of its servers until the file is approved again. (docs/MCP.md)[auto_review]can be authored. A new global-onlycodewhale.auto_reviewpassthrough writes Codewhale's tool-call review policy into the user~/.codewhale/config.toml. (docs/CONFIGURATION.md,[auto_review])Changes
MCP
src/features/mcp/codewhale-mcp.tsmcp_sha256stored in the user config, re-approval after every change, and refusal of a symlinked file..codewhale/mcp.jsonlogs an info line reminding the user to run/mcp review//mcp approve <digest>.docs/reference/file-formats.md: the Codewhale MCP note says the same.Permissions
src/types/permissions.ts:codewhale.auto_reviewis validated asz.looseObject({}).src/features/permissions/codewhale-project-config.ts: new helpers.createCodewhaleUserConfigFilepatches{ auto_review }into~/.codewhale/config.tomlthrough the shared-config gateway.readCodewhaleUserAutoReviewreads the table back for import.warnAboutProjectAutoReviewwarns about the override in project mode.src/features/permissions/codewhale-permissions.tsgetAuxiliaryFilesemits the user config when the override is set.[auto_review]intocodewhale.auto_review, next tocodewhale.rules.getExtraSharedWritePathsnow declares.codewhale/config.tomlin both scopes.src/features/shared/shared-config-gateway.ts: permissions now own["allow_shell", "auto_review"]in.codewhale/config.toml.[hooks].docs/reference/file-formats.md: newcodewhale.auto_reviewparagraph with an example.src/generated/docs-content.tsis regenerated.[hooks]and top-level keyspermissions.tomlDesign decisions
auto_review, notautoReviewas the triage plan suggested. The value is the native table, written verbatim. The Codex CLI passthrough of the same kind of table (codexcli.auto_review) and the existingcodewhale.rulesboth use the native name, and CodeBuddy'sautoReviewis also just its native key.looseObject).action_kind, and the retiredtext_contains.auto_reviewtable is replaced, and only when the override is set.autoReviewbehavior.[auto_review], and writing one would only produce Codewhale's own warning.info, notwarn. Re-approval is the expected workflow, not a problem. It fires only in project scope and only when the bytes change, comparing trimmed content to ignore the trailing newline.Skipped items
approval_policy/sandbox_modeoverlay passthrough: these keys have no canonical counterpart, and whether to add a passthrough is a maintainer design call.authority,branch_policy, ...): needs a product decision, andAGENTS.mdalready carries the rules.auto_review.disabledkey: not special-cased. It is passed through like any other key and Codewhale decides what to do with it.Refs #3174. The two design-call items above stay open.
🤖 Generated with Claude Code
https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4