Skip to content

docs: document env var inheritance into the CLI subprocess (closes #1100)#1113

Open
ondraulehla wants to merge 1 commit into
anthropics:mainfrom
ondraulehla:docs/env-vars-subprocess
Open

docs: document env var inheritance into the CLI subprocess (closes #1100)#1113
ondraulehla wants to merge 1 commit into
anthropics:mainfrom
ondraulehla:docs/env-vars-subprocess

Conversation

@ondraulehla

Copy link
Copy Markdown

Closes #1100.

Adds an "Environment variables" README section (linked from the existing flow after "Working Directory") documenting how _spawn_process builds the CLI subprocess environment: full inheritance minus CLAUDECODE, the CLAUDE_CODE_ENTRYPOINT default, options.env overrides, the always-set CLAUDE_AGENT_SDK_VERSION, and the conditional checkpointing/PWD/OTEL keys.

Includes a copy-pasteable example of overriding and blanking inherited variables via options.env, and a security note that inheritance is allowlist-free (relevant when agents process untrusted input).

Docs only — no code changes.

Adds an 'Environment variables' README section documenting how
_spawn_process builds the CLI subprocess environment: full inheritance
minus CLAUDECODE, the CLAUDE_CODE_ENTRYPOINT default, options.env
overrides, the always-set CLAUDE_AGENT_SDK_VERSION, and the conditional
checkpointing/PWD/OTEL keys. Includes a copy-pasteable example of
overriding and blanking inherited variables, and a note that
inheritance is allowlist-free.

Closes anthropics#1100

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

docs: env vars inherited into CLI subprocess (filter list)

1 participant