Answer: If Zed is opened via the CLI (`zed`), it inherits the environment variables from the surrounding shell session. Starting with Zed 0.152.0, the CLI `zed` will always pass along its environment to Zed, regardless of whether a Zed instance was previously running. Status: Overdue (check was due 2026-11-20T13:40:25Z and has not succeeded) Entry: tool/zed/settings/cli-environment-variables Revision: 1 Digest: sha256:20fd6744e2e60968 (changes whenever the content changes) Timeline: Created: 2026-11-13T04:01:58Z Last changed: 2026-11-13T04:01:58Z Last verified: 2026-11-19T13:40:25Z Next check: 2026-11-20T13:40:25Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Inheritance behavior | inherit the environment variables from the surrounding shell session | [1] | 2026-11-19 Version | 0.152.0 | [1] | 2026-11-19 Prior behavior | only the first Zed instance would inherit the environment variables | [1] | 2026-11-19 Sources: [1] Zed Industries. "zed.dev/docs/environment.md". https://zed.dev/docs/environment.md Role: primary. Accessed: 2026-11-19T13:40:25Z Quote: "it will inherit the environment variables from the surrounding shell session" (Supports: Inheritance behavior) Quote: "Starting with Zed 0.152.0, the CLI `zed` will _always_ pass along its environment to Zed" (Supports: Version) Quote: "only the first Zed instance would inherit the environment variables" (Supports: Prior behavior) Snapshot SHA-256: 10ce443e5b5e85351b8506ba0e1df95ca8cab1e52aa49cba5bfda0ce7fed45cd (captured 2026-11-13T04:01:58Z) 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]. On this check the text of [1] was unchanged since 2026-11-13T04:01:58Z, so the values verified then were kept. Cross-check: not-available at 2026-11-19T13:40:25Z. No independent second source is configured for this entry Last successful check: 2026-11-19T13:40:25Z Last attempt: 2026-11-19T13:40:25Z Notes and limitations: Extracted automatically from a single official source (section "Launched from the CLI"). Human-readable page: https://zed.dev/docs/environment.html Related: https://latestn.com/tool/zed/settings/commit-line-length How do I configure the commit message line length in Zed? https://latestn.com/tool/zed/settings/compile-commands-setup How do I set up compile commands for C++ in Zed? https://latestn.com/tool/zed/settings/configure-air-formatter How do I configure the Air formatter for R in Zed? https://latestn.com/tool/zed/settings/check-current-version How do I check which version of Zed I'm using? https://latestn.com/tool/zed/settings/choose-php-language-server How do I choose or change the PHP language server in Zed? https://latestn.com/tool/zed/settings/clangd-arguments How do I pass arguments to clangd in Zed? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T04:01:58Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/zed/settings/cli-environment-variables/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/zed/settings/cli-environment-variables POST: https://latestn.com/dispute/tool/zed/settings/cli-environment-variables with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/zed/settings/cli-environment-variables?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How does Zed get environment variables when launched from the CLI? Revision 1, last verified 2026-11-19T13:40:25Z. https://latestn.com/tool/zed/settings/cli-environment-variables (accessed 2026-11-21T09:52:48Z). @misc{LatestN_tool_zed_settings_cli_environment_variables_r1, title = {How does Zed get environment variables when launched from the CLI?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/zed/settings/cli-environment-variables}}, note = {Revision 1; digest sha256:20fd6744e2e60968; last verified 2026-11-19T13:40:25Z; accessed 2026-11-21T09:52:48Z} } 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/zed/settings/cli-environment-variables