Session rename writes custom-title to ~/.claude, ignoring $CLAUDE_CONFIG_DIR

Status Open
Reported on v2.1.238
Maintainer reply None cached
Activity 0 comments · opened Aug 21, 2026

Session rename writes custom-title to ~/.claude, ignoring $CLAUDE_CONFIG_DIR

Summary

When CLAUDE_CONFIG_DIR points somewhere other than ~/.claude, renaming a
conversation writes the custom-title record into the default ~/.claude
directory instead of the configured one. The session list reads from
CLAUDE_CONFIG_DIR, finds no title, and falls back to the auto-generated
summary, so the rename silently does nothing.

The transcript itself is written to the correct directory, so this is specific
to the rename code path, not to config resolution generally.

Environment

  • Claude Code extension 2.1.238 (also reproduced on 2.1.237)
  • Host: Cursor, macOS 15 / Darwin 25.5.0, arm64
  • CLI build 2026-08-20T15:08:27Z
  • CLAUDE_CONFIG_DIR=~/.claude-cursor, set by the extension when it spawns the

CLI. Confirmed present on every running claude process via ps eww, so the
variable is reaching the process that does the write.

Steps to reproduce

  1. Run the IDE extension with CLAUDE_CONFIG_DIR set to a non-default path.
  2. Start a conversation.
  3. In the conversation list, hover a session row, click the rename (pencil)

icon, type a name, press Enter.

  1. The new name shows briefly, then reverts to the auto-generated summary.

Expected

The custom-title record is appended to
$CLAUDE_CONFIG_DIR/projects/<project>/<sessionId>.jsonl and the name persists.

Actual

$CLAUDE_CONFIG_DIR/projects/<project>/<sessionId>.jsonl (the real transcript,
~500KB, mode 600) contains zero custom-title records.

~/.claude/projects/<project>/<sessionId>.jsonl is created instead. It holds
nothing but the rename attempts, no transcript at all:

{"type":"custom-title","sessionId":"<id>","customTitle":"Linkedin Playbook"}
{"type":"custom-title","sessionId":"<id>","customTitle":"Linkedin"}
{"type":"custom-title","sessionId":"<id>","customTitle":"Linked"}

That file is mode 644 while genuine transcripts are 600, which suggests it was
freshly created by a code path that resolved the default home config directory
rather than the configured one.

Why this is easy to miss

The same machine also runs a second Claude Code install on the default
config dir, and renaming works perfectly there. Checking every transcript under
~/.claude/projects/, the custom-title records sit inside the real
multi-megabyte session files exactly as they should:

 2977779 bytes   35 title-records
 3747089 bytes   48 title-records
33708248 bytes  110 title-records

The only broken case is the 828-byte orphan with no transcript, which is the
redirected profile.

So the buggy path is presumably always writing to the default location. With
CLAUDE_CONFIG_DIR unset that happens to be the correct location, and the bug
is invisible. It only surfaces once the config dir is redirected.

Workaround

Append the record to the correct file by hand:

printf '%s\n' '{"type":"custom-title","sessionId":"<id>","customTitle":"<name>"}' \
  >> "$CLAUDE_CONFIG_DIR/projects/<project>/<id>.jsonl"

Related, but not duplicates

  • #81278 reports CLAUDE_CONFIG_DIR being ignored broadly, for config reads and

agents. Same class of bug, no mention of session titles. Same for #74393
(/plugin install) and #79952 (config editing).

  • #32150 is a different failure: there the custom-title records are in the

correct file and get outranked by a later last-prompt entry. Here there are
no custom-title records in the correct file at all.

  • #75602 is display-only, with the titles confirmed correctly stored on disk.

Separate, smaller note

The rename control is hard to discover. It is visibility:hidden until the row
is hovered and shares a grid cell with the timestamp, so nothing in the resting
UI suggests it exists, and there is no command palette entry for it. Happy to
file that separately if it is worth tracking.

View original on GitHub ↗