Repository navigation
feat(takt): write read deny rules to provider_options.claude.permissions.deny - #3935
Merged
Merged
Conversation
…ons.deny Takt 0.76.0 passes provider_options.claude.permissions.deny to claude-sdk and claude-headless as Claude Code permissions.deny rules. When the active provider is Claude-family, canonical read deny rules are now written there as Read(<pattern>) entries, alongside the readonly mode they already derive. The rules are merged into the deny list otherwise in force (the authored takt block's list, else the one in config.yaml) and nothing is removed, so a deny never becomes a broader allow. Runtime provider mode skips them with a warning, since provider_options cannot be written to config.yaml there. Refs #2421 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
Takt replaces provider_options.claude.permissions.deny across layers, so a project-scope generate that writes the list drops the global ~/.takt/config.yaml list for that project. The global file is now read once for both the inherited provider and that list, and a warning names the global rules Claude will stop applying (they are not copied into the committed project file). Also document that an authored takt list replaces a hand-written one, that provider_routing steps routed to Claude get no rules, and cover the claude-headless / claude alias / claude-terminal / global-scope cases. Refs #2421 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
…kt-claude-read-deny # Conflicts: # src/generated/docs-content.ts
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 the 2026-11-19 upstream re-check in #2421: Takt 0.76.0 (nrslib/takt#1961) added
provider_options.claude.permissions.deny, a list of Claude Codepermissions.denyrules passed toclaude-sdk(and itsclaudealias) andclaude-headless. Until now the Takt permissions adapter only collapsed a canonicalreaddeny intodefault_permission_mode: readonly, so the path itself was lost.readdeny rules are now also written asRead(<pattern>)entries intoprovider_options.claude.permissions.deny(a catch-all"*"becomes a bareRead), in the same form the Claude Code permissions/ignore adapters use.denystill makes itreadonly. The rules are purely additive.denylist wholesale, so the rules are merged into the list otherwise in force: the authoredtakt.provider_options.claude.permissions.deny, else the one already inconfig.yaml. Nothing is removed from it, so generate can never turn a deny into a broader allow. Otherclaudeoptions (sandbox,import_user_read_deny, ...) are kept.claude-terminal) get nothing.readaskrules are not written.provider_optionsinconfig.yamlstops Takt with "Mixed provider configuration detected".takt.provider_options, so regenerate writes the same list (covered by a test).docs/reference/file-formats.md(Takt permissions section) documents the behavior;src/generated/docs-content.tsregenerated.Upstream reference: https://github.com/nrslib/takt/blob/main/docs/configuration.md#claude-read-deny-rules
Still open in #2421 (not in this PR)
ignoresupport for Takt (emitting.rulesyncignorepatterns into the same list) — a new feature/target surface, left for a maintainer decision.assistant.init_files, companion reviewer files,.takt/workflows/rules/, the runtimemcpregistry, and provider-options presets — unchanged design decisions.manager.sensitive_pathswatch item is obsolete (removed in Takt 0.75.0) and needs no work.Refs #2421
Test plan
src/features/permissions/takt-permissions.test.ts(default provider, catch-all, authored-list merge, existing config.yaml list, non-Claude provider,ask, runtime mode, import round-trip)pnpm cicheck(one load-induced timeout insrc/utils/glob.test.ts, passes when rerun alone;pnpm run cicheck:contentgreen)🤖 Generated with Claude Code
https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4