Answer: Append `--permission-mode auto` after `"$@"` in your wrapper script to pin a permission mode, and append `--allowed-tools` with your rules after `"$@"` to pre-approve specific tools. Status: Confirmed Entry: tool/claude-code/permissions-and-security/pin-permission-mode-self-hosted Revision: 1 Digest: sha256:2d23fa31018d64d4 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:05:38Z Last changed: 2026-11-13T03:05:38Z Last verified: 2026-11-20T12:24:51Z Next check: 2026-11-21T12:24:51Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Pin permission mode | --permission-mode auto | [1] | 2026-11-20 Pre-approve tools flag | --allowed-tools | [1] | 2026-11-20 Pre-approve tools example | --allowed-tools "Bash(bazel *) Bash(yarn *) mcp__internal__*" | [1] | 2026-11-20 Narrow with disallowed tools | --disallowed-tools | [1] | 2026-11-20 Sources: [1] Anthropic. "Customize sessions in self-hosted environments". https://code.claude.com/docs/en/self-hosted-environments-configuration.md Role: primary. Accessed: 2026-11-20T12:24:51Z Quote: "exec "$CLAUDE_RUNNER_CLAUDE_BIN" "$@" --permission-mode auto" (Supports: Pin permission mode) Quote: "To pre-approve specific tools, append `--allowed-tools` with your rules after `"$@"` in your wrapper script" (Supports: Pre-approve tools flag) Quote: "for example `--allowed-tools "Bash(bazel *) Bash(yarn *) mcp__internal__*"`" (Supports: Pre-approve tools example) Quote: "To narrow, append `--disallowed-tools`, which denies tools even if another rule allows them." (Supports: Narrow with disallowed tools) Published: 2026-11-20T03:01:10Z Snapshot SHA-256: 97cb122d0eb49028135f9c375d50d3b63c690e9e9c83d350930a583500d2d828 (captured 2026-11-20T12:24:49Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:24:51Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:24:51Z Last attempt: 2026-11-20T12:24:51Z Notes and limitations: Extracted automatically from a single official source (section "Permissions and tool approval"). Related: https://latestn.com/tool/claude-code/permissions-and-security/plugin-capabilities What can a Claude Code plugin do on my machine? https://latestn.com/tool/claude-code/permissions-and-security/pre-approve-tools-for-skills How do I pre-approve tools for skills in Claude Agent SDK? https://latestn.com/tool/claude-code/permissions-and-security/prompt-injection-protections How does Claude Code protect against prompt injection? https://latestn.com/tool/claude-code/permissions-and-security/permission-allow-rules How do I allow or deny specific permission rules in Claude Code settings? https://latestn.com/tool/claude-code/permissions-and-security/permission-evaluation-order How are permissions evaluated in Claude Code? https://latestn.com/tool/claude-code/permissions-and-security/permission-modes What permission modes does Claude Code support and what does each one do? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T12:20:06Z | recovered | Check succeeded again | — 2026-11-18T12:19:55Z | check-failed | Extraction did not pass verification: section "Permissions and tool approval" not found in the source (the page may have been reorganized) | — 2026-11-13T03:05:38Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/permissions-and-security/pin-permission-mode-self-hosted/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/permissions-and-security/pin-permission-mode-self-hosted POST: https://latestn.com/dispute/tool/claude-code/permissions-and-security/pin-permission-mode-self-hosted with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/permissions-and-security/pin-permission-mode-self-hosted?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I pin a permission mode or pre-approve specific tools for Claude Code self-hosted sessions? Revision 1, last verified 2026-11-20T12:24:51Z. https://latestn.com/tool/claude-code/permissions-and-security/pin-permission-mode-self-hosted (accessed 2026-11-21T10:07:09Z). @misc{LatestN_tool_claude_code_permissions_and_security_pin_permission_mode_self_hosted_r1, title = {How do I pin a permission mode or pre-approve specific tools for Claude Code self-hosted sessions?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/permissions-and-security/pin-permission-mode-self-hosted}}, note = {Revision 1; digest sha256:2d23fa31018d64d4; last verified 2026-11-20T12:24:51Z; accessed 2026-11-21T10:07:09Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/permissions-and-security/pin-permission-mode-self-hosted