[BUG] Linux desktop: "No folder" sessions are never saved on eCryptfs homes (project dir name 144 chars > NAME_MAX 143), moving the session always fails – still happening (re #80753, #59726)

Status Open
Reported on v2.1.284
Maintainer reply None cached
Activity 0 comments · opened Oct 4, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Code tab sessions started with "No folder" run in a scratch workspace such as
~/.config/Claude/scratch-workspaces/e49b8b87-542d-4fba-8020-a3a3aaca56e0/18b6c616-4250-4ade-aeef-201aba1d0388/scratch-2026-10-03-3cdb7a

The transcript directory derived from it has a 144-character name:
~/.claude/projects/-home-mark--config-Claude-scratch-workspaces-e49b8b87-542d-4fba-8020-a3a3aaca56e0-18b6c616-4250-4ade-aeef-201aba1d0388-scratch-2026-10-03-3cdb7a

My home directory is encrypted with eCryptfs (Linux Mint's "encrypt home folder" option), which allows at most 143 characters per file name. So the directory can never be created:

  1. The transcript is never written, with no warning. After an app restart the whole conversation is lost ("No conversation found with session ID ...").
  2. Moving the session into a project folder fails at the end of every turn: "Die Sitzung konnte nicht nach /home/mark/Schreibtisch/Claude/Kinderhaus/KI-Test/Claude verschoben werden." (set_cwd: relocation failed — ENAMETOOLONG)

This is the same root cause as #80753 and #59726, both closed by the stale bot, not fixed.

What Should Happen?

  • Scratch workspace paths / project directory names stay below the file system's NAME_MAX (e.g. shorter IDs, or truncate and hash names that are too long).
  • If the transcript cannot be written, show a visible warning instead of silently losing the chat.
  • Moving a session to a project folder should work even if the old transcript directory does not exist.

Error Messages/Logs

[error] [CCD] set_cwd failed for session local_29c0811d-9274-4360-8b68-93c46a7d807d: set_cwd: relocation failed — ENAMETOOLONG: name too long, stat '/home/mark/.claude/projects/-home-mark--config-Claude-scratch-workspaces-e49b8b87-542d-4fba-8020-a3a3aaca56e0-18b6c616-4250-4ade-aeef-201aba1d0388-scratch-2026-10-03-3cdb7a'
[warn] [CCD] pending cwd apply for local_29c0811d-9274-4360-8b68-93c46a7d807d failed: set_cwd: relocation failed — ENAMETOOLONG: name too long
[info] Failed to write rename to CLI transcript for local_29c0811d-9274-4360-8b68-93c46a7d807d: Session f72e4e0f-e99c-4cd2-8f64-a71861602f60 not found in project directory for /home/mark/.config/Claude/scratch-workspaces/.../scratch-2026-10-03-3cdb7a
[error] Session local_29c0811d-9274-4360-8b68-93c46a7d807d query error: Claude Code returned an error result: No conversation found with session ID: 24b205f5-c4f7-4d8f-8cc4-49da4d9779cf

$ getconf NAME_MAX ~/.claude
143

Steps to Reproduce

  1. Linux with an eCryptfs-encrypted home directory (Linux Mint / Ubuntu "encrypt home folder"), NAME_MAX = 143.
  2. Open the Claude desktop app, Code tab, start a new session WITHOUT choosing a folder ("No folder").
  3. Chat a bit. Note: no transcript appears under ~/.claude/projects/.
  4. Restart the app: the conversation is gone.

Or: let Claude move the session into a project folder (change_directory). The error "Die Sitzung konnte nicht nach … verschoben werden" appears at the end of every turn.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.284 (bundled with the Claude desktop app 2.9939.4 for Linux)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

  • Linux Mint 22.3, kernel 7.0.0-38, home on eCryptfs (mount type ecryptfs)
  • Sessions started directly with a (short) folder are saved normally – only "No folder" sessions are affected, because the scratch workspace path is too long.
  • Workaround: always start sessions with a folder selected.
  • Related: #80753, #59726 (both auto-closed as stale, not fixed), #91935 (similar path-length problem on Windows)

View original on GitHub ↗