Answer: Use the `decode-token` subcommand to read claims from the session JWT, which reads the token from an argument, from `CLAUDE_CODE_SESSION_ACCESS_TOKEN`, or from stdin, in that order. The example decodes the creator identity, exchanges it for short-lived AWS credentials, and execs into Claude Code. Status: Confirmed Entry: tool/claude-code/admin-and-enterprise/per-session-credentials-wrapper Revision: 1 Digest: sha256:936b81114eae3d58 (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:49Z Next check: 2026-11-21T12:24:49Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of subcommand | decode-token | [1] | 2026-11-20 token source order | from an argument, from `CLAUDE_CODE_SESSION_ACCESS_TOKEN`, or from stdin, in that order | [1] | 2026-11-20 example action | decodes the creator identity, exchanges it for short-lived AWS credentials, and execs into Claude Code | [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:49Z Quote: "Use the `decode-token` subcommand to read claims from the session JWT." (Supports: subcommand) Quote: "It reads the token from an argument, from `CLAUDE_CODE_SESSION_ACCESS_TOKEN`, or from stdin, in that order" (Supports: token source order) Quote: "The example below decodes the creator identity, exchanges it for short-lived AWS credentials, and execs into Claude Code" (Supports: example action) 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:49Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:24:49Z Last attempt: 2026-11-20T12:24:49Z Notes and limitations: Extracted automatically from a single official source (section "Provision credentials scoped to the session creator"). Related: https://latestn.com/tool/claude-code/admin-and-enterprise/plan-version-upgrades-gateway How do I plan Claude Code version upgrades when maintaining an LLM gateway? https://latestn.com/tool/claude-code/admin-and-enterprise/plugin-relevance-field-reference What fields and signals can I use in a Claude Code plugin relevance block, such as working directory, command name, or manifest dependency matching? https://latestn.com/tool/claude-code/admin-and-enterprise/plugin-telemetry-events Which OpenTelemetry events should I use to track Claude Code plugin installs and usage across an organization? https://latestn.com/tool/claude-code/admin-and-enterprise/offer-claude-code-in-products Can I offer or preinstall Claude Code in my own product or hosted sandbox? https://latestn.com/tool/claude-code/admin-and-enterprise/on-demand-runner-idle-exit How do I make Claude Code on-demand runners exit when idle? https://latestn.com/tool/claude-code/admin-and-enterprise/org-mod-controls How do I control mods for my organization in Claude Code? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:05:38Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/admin-and-enterprise/per-session-credentials-wrapper/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/admin-and-enterprise/per-session-credentials-wrapper POST: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/per-session-credentials-wrapper with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/per-session-credentials-wrapper?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I provision per-session credentials in a Claude Code self-hosted environment wrapper script? Revision 1, last verified 2026-11-20T12:24:49Z. https://latestn.com/tool/claude-code/admin-and-enterprise/per-session-credentials-wrapper (accessed 2026-11-21T09:59:43Z). @misc{LatestN_tool_claude_code_admin_and_enterprise_per_session_credentials_wrapper_r1, title = {How do I provision per-session credentials in a Claude Code self-hosted environment wrapper script?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/admin-and-enterprise/per-session-credentials-wrapper}}, note = {Revision 1; digest sha256:936b81114eae3d58; last verified 2026-11-20T12:24:49Z; accessed 2026-11-21T09:59:43Z} } 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/admin-and-enterprise/per-session-credentials-wrapper