Skip to content

feat(takt): write read deny rules to provider_options.claude.permissions.deny - #3935

Merged
dyoshikawa merged 3 commits into
mainfrom
resolve-issue-2421-takt-claude-read-deny
Nov 22, 2026
Merged

dyoshikawa merged 3 commits into
mainfrom
resolve-issue-2421-takt-claude-read-deny

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

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 Code permissions.deny rules passed to claude-sdk (and its claude alias) and claude-headless. Until now the Takt permissions adapter only collapsed a canonical read deny into default_permission_mode: readonly, so the path itself was lost.

  • When the active provider is Claude-family, canonical read deny rules are now also written as Read(<pattern>) entries into provider_options.claude.permissions.deny (a catch-all "*" becomes a bare Read), in the same form the Claude Code permissions/ignore adapters use.
  • The coarse mode derivation is unchanged: any deny still makes it readonly. The rules are purely additive.
  • Takt replaces a deny list wholesale, so the rules are merged into the list otherwise in force: the authored takt.provider_options.claude.permissions.deny, else the one already in config.yaml. Nothing is removed from it, so generate can never turn a deny into a broader allow. Other claude options (sandbox, import_user_read_deny, ...) are kept.
  • Non-Claude providers (including claude-terminal) get nothing. read ask rules are not written.
  • Runtime provider mode skips the rules with a warning, because provider_options in config.yaml stops Takt with "Mixed provider configuration detected".
  • Import is unchanged: the list round-trips through 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.ts regenerated.

Upstream reference: https://github.com/nrslib/takt/blob/main/docs/configuration.md#claude-read-deny-rules

Still open in #2421 (not in this PR)

  • ignore support for Takt (emitting .rulesyncignore patterns into the same list) — a new feature/target surface, left for a maintainer decision.
  • assistant.init_files, companion reviewer files, .takt/workflows/rules/, the runtime mcp registry, and provider-options presets — unchanged design decisions.
  • The 2026-11-03 manager.sensitive_paths watch item is obsolete (removed in Takt 0.75.0) and needs no work.

Refs #2421

Test plan

  • New unit tests in 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 in src/utils/glob.test.ts, passes when rerun alone; pnpm run cicheck:content green)

🤖 Generated with Claude Code

https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4

dyoshikawa and others added 3 commits November 22, 2026 17:40
…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
@dyoshikawa
dyoshikawa merged commit 6350e97 into main Nov 22, 2026
10 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-2421-takt-claude-read-deny branch November 22, 2026 09:18
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.

1 participant