Follow Discord
Sweep 23 Oct 2026 · 21:48Z Build v2.1.310 529 read Stable v2.1.308 Latest v2.1.309 Next v2.1.310 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Desktop application changeddesktop

Nearest release: v2.1.310, published an hour after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 23 Oct 2026 19:43 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 23 Oct 2026 20:07 UTC.

Upstream edited
Recorded here
Lines+41added
Lines−7removed
From line 827 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits86to this page, all time

### Environment variables in local sessions #### Exported variable missing or wrong in commands Claude runs ### Local sessions on managed devices ### Local sessions #### Local sessions on managed devices

The whole hunk

from line 827, old and new numbered
/
lines
from line 827
827827* **Edit or delete**: hover over the entry and click the gear icon. To delete a local or SSH environment, click **Delete environment** in **Edit environment**.
828828* **Archive cloud environments**: see [Archive an environment](https://code.claude.com/docs/en/cloud-environments.md#archive-an-environment).
829829 
830### Local sessions
830### Environment variables in local sessions
831831 
832The desktop app does not always inherit your full shell environment. On macOS, when you launch the app from the Dock or Finder, it reads your shell profile, such as `~/.zshrc` or `~/.bashrc`, to give Claude Code `PATH` and a fixed set of Claude Code variables, but not other variables you export there. On Windows, the app inherits user and system environment variables but does not read PowerShell profiles.
832To set an environment variable for a local session, [add it to a saved local environment](#set-environment-variables-for-local-sessions), then start a new session from that environment.
833833 
834Variables such as `PATH` and `CLAUDE_CONFIG_DIR` have their own instructions:
835 
836| Variable | What to do instead |
837| :- | :- |
838| `PATH`, the folders your system searches for programs such as `npm` | See [Session not finding installed tools](#session-not-finding-installed-tools). On Windows, Desktop doesn't read PowerShell profiles, so set `PATH` in your user or system environment variables, then quit and reopen Desktop. |
839| A variable for an MCP server from [`claude_desktop_config.json`](#mcp-servers-from-the-claude-desktop-chat-app) | Quit Desktop, set it in that server's `env` block, then reopen Desktop |
840| [`CLAUDE_CONFIG_DIR`](https://code.claude.com/docs/en/env-vars#variables) or [`CLAUDE_CODE_TMPDIR`](https://code.claude.com/docs/en/env-vars#variables) | Set it in [one of the places you'd set a variable for dev servers](#set-environment-variables-for-dev-servers), then quit and reopen Desktop |
841| `API_TIMEOUT_MS`, `ANTHROPIC_BASE_URL`, or another variable Desktop sets itself | See [Environment variables Desktop sets itself](#environment-variables-desktop-sets-itself) |
842 
843On macOS or Linux, if you already set your variable with `export` in `~/.zshrc` or `~/.bashrc`, see [Exported variable missing or wrong in commands Claude runs](#exported-variable-missing-or-wrong-in-commands-claude-runs).
844 
834845#### Set environment variables for local sessions
835846 
836847Add the variables to a saved local environment and start your sessions from it. Desktop [sets some variables itself](#environment-variables-desktop-sets-itself), such as `API_TIMEOUT_MS`, and your sessions get its value for those instead of yours.
from line 850
839850>
840851> If your environment selector is above the prompt box, you have the [earlier layout](#check-which-layout-you-have), which has no saved local environments. Use the [local environment editor](#use-the-local-environment-editor) instead.
841852 
842**1. Open the environment's form**
853**1. Open a local environment's form**
843854 
844Open [**New environment**](#create-a-saved-environment) or [**Edit environment**](#use-edit-or-remove-a-saved-environment).
855* **To create a saved local environment**: select [**New environment**](#create-a-saved-environment) at the bottom of the environment selector's menu, then the **Local** tab
856* **To change one you already have**: in the environment selector, hover over a saved environment under **Local** and click the gear icon to open [**Edit environment**](#use-edit-or-remove-a-saved-environment)
845857 
846858**2. Enter the variables**
847859 
from line 886
874886 
875887Enter one `KEY=value` per line and select **Save changes**. Variables you save here are stored encrypted on your machine. Local sessions get them, except any variable that [Desktop sets itself](#environment-variables-desktop-sets-itself), such as `API_TIMEOUT_MS`. Restart Desktop to give your variables to dev servers.
876888 
889#### Exported variable missing or wrong in commands Claude runs
890 
891If a command Claude runs on macOS or Linux doesn't get a variable you set with `export` in `~/.zshrc` or `~/.bashrc`, or gets the wrong value, try these in order:
892 
893**1. Start a new session**
894 
895Ask Claude to run the command again.
896 
897**2. Quit and reopen Desktop**
898 
899Then start a new session.
900 
901**3. Check your saved variables**
902 
903If a command gets the wrong value, check whether you also set the variable in a [saved environment](#use-edit-or-remove-a-saved-environment) or the [local environment editor](#use-the-local-environment-editor). If so, change the value there and start a new session.
904 
905**4. Use a saved environment**
906 
907Add the variable to a [saved local environment](#set-environment-variables-for-local-sessions), then start a new session from that environment. For a variable such as `PATH` or `CLAUDE_CONFIG_DIR`, follow [its own instructions](#environment-variables-in-local-sessions) instead.
908 
909Before v2.1.304, Claude Code doesn't pass exported variables to commands, so [check which version the session runs](#claude-code-version-in-the-code-tab).
910 
877911#### Environment variables Desktop sets itself
878912 
879913If you set `API_TIMEOUT_MS` or `ANTHROPIC_BASE_URL` and nothing changed in your local sessions, it's because Desktop sets those [variables](https://code.claude.com/docs/en/env-vars.md#variables), among others, itself. A local session gets Desktop's value whether you set yours in your shell profile, your Windows user or system variables, the local environment editor, or a saved environment. Moving yours to a settings file doesn't help, because Claude Code [ignores that value](https://code.claude.com/docs/en/settings-reference.md#how-env-values-interact-with-your-shell) in a local session.
from line 925
891925 
892926On models with [adaptive reasoning](https://code.claude.com/docs/en/model-config.md#adjust-effort-level), Claude Code ignores the number itself in a positive `MAX_THINKING_TOKENS` value because adaptive reasoning controls thinking depth instead. On Opus 4.6 and Sonnet 4.6, set `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` to `1` to use a fixed thinking budget; Fable models, Sonnet 5 and later, Haiku 5.5, and Opus 4.7 and later always use adaptive reasoning and have no fixed-budget mode.
893927 
894#### Local sessions on managed devices
928### Local sessions on managed devices
895929 
896930If the entry for your computer is grayed out in the environment selector, with the tooltip **Disabled by your organization**, your administrator has [turned off local sessions](#managed-settings). On Windows the [WSL](https://code.claude.com/docs/en/desktop-wsl.md) entry, whose availability on managed devices is [governed separately](https://code.claude.com/docs/en/admin-setup.md#wsl-sessions-in-claude-code-desktop), is grayed out the same way.
897931 
Feedback