[BUG] Desktop (Code tab): saved local environment is not remembered, and the "Save as environment" suggestion keeps reappearing

Open
#111,497 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
macos, typescript

Research direction

Behavior is in the desktop app's Code-tab session setup, not in the CLI: start from whatever reads and writes ccd-session-presets.json (one preset with target.kind local and target.cwd set to the folder) and from the new-session picker's default-selection logic. Then find the component that renders the "Save as environment" suggestion banner and the handler behind "Not now". Done means the last-used environment is preselected, the banner is suppressed when a preset for the cwd exists, and "Not now" persists; first confirm the desktop client source is reachable from this repo, since the payload only shows the CLI codebase.

Written by the indexing model from the issue text.

Description

area:desktop bug platform:macos
What's Wrong?

I saved a local folder as an environment, using the suggestion's "Save as environment" link. It now appears in the environment picker under "Local", below "This computer".

  1. Every new-session screen still opens with "This computer" checked. The saved environment is never preselected, even right after I used it for the previous session, so I have to pick it by hand each time.
  2. Whenever a session starts on "This computer" in that same folder, the suggestion line comes back at the top of the session, although an environment for that exact folder already exists. French UI text: « Deuxième session sur cet ordinateur · ; avec un environnement, elle reste à un clic · Enregistrer comme environnement · Pas maintenant » ("Second session on this computer · ; with an environment, it stays one click away · Save as environment · Not now").
  3. "Not now" only hides the suggestion for the current session.

~/Library/Application Support/Claude/ccd-session-presets.json holds exactly one preset for this folder on the account: target.kind is local, target.cwd is the folder, and there is no additionalFolders. So this is not the added-folder case of #104306, although the symptom looks the same. Possibly related: #104306, #103153.

What Should Happen?
  • The picker remembers the last environment used, or lets me set a default one.
  • The suggestion does not appear when an environment already exists for the folder, and "Not now" dismisses it for good.
Steps to Reproduce
  1. Desktop app, Code tab. Start a session on "This computer" in a local folder.
  2. When the suggestion line appears, click "Save as environment". The environment is listed in the picker under "Local".
  3. Open the new-session screen again: the folder is the same, but the picker shows "This computer" checked, not the saved environment.
  4. Start the session: the suggestion line appears again.
Workaround

Choosing the saved environment by hand in the picker at every new session.

Claude Code Version

Claude desktop app 6.28899.6 (Code tab, French UI)

Operating System

macOS 26.6.2 (Apple Silicon)

Dominant language
TypeScript
Stars
156k
Forks
25k
Avg merge
16h 19m
Merged PRs (30d)
5

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anthropics/claude-code

All issues in anthropics/claude-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.