claude-code - 💡(How to fix) Fix [BUG] Chats appear as 'Temporary' when ai-title entry is missing from .jsonl session file [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52411Fetched 2026-04-24 06:07:53
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Error Message

Error Messages/Logs

No error messages shown. The sessions silently appear as "Temporary" in the sidebar with no indication of what went wrong.

Fix Action

Fix / Workaround

Workaround: manually appending this line to the .jsonl file restores the session: {"type":"ai-title","aiTitle":"Title here","sessionId":"<uuid>"}

Code Example

No error messages shown. The sessions silently appear as "Temporary" in the sidebar with no indication of what went wrong.

Workaround: manually appending this line to the .jsonl file restores the session:
{"type":"ai-title","aiTitle":"Title here","sessionId":"<uuid>"}
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

Sessions in ~/.claude/projects/<project>/ appear as Temporary in the sidebar despite having full conversation history. This happens when the .jsonl session file has no ai-title or custom-title entry (which occurs when the app closes before title generation completes).

The sessions are not lost — the data is intact — but they're inaccessible from the UI unless you manually append a title entry to the file.

What Should Happen?

Sessions with conversation history should always be recoverable from the UI. If title generation fails or the app closes mid-session, the chat should fall back to displaying the first user message as the title instead of showing "Temporary".

Error Messages/Logs

No error messages shown. The sessions silently appear as "Temporary" in the sidebar with no indication of what went wrong.

Workaround: manually appending this line to the .jsonl file restores the session:
{"type":"ai-title","aiTitle":"Title here","sessionId":"<uuid>"}

Steps to Reproduce

  1. Open Claude Code desktop on Windows
  2. Start a conversation in any project
  3. Close the app before the chat title is generated (within the first few seconds)
  4. Reopen the app
  5. The session appears as "Temporary" in the sidebar despite having conversation history

The .jsonl file exists in ~/.claude/projects/<project>/ but contains no ai-title or custom-title entry.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.111 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

This issue has multiple triggers:

  1. App closes before title generation completes → no ai-title entry written
  2. App closes abruptly after title is generated → title entry is lost (not flushed to disk)
  3. App update → previous session titles disappear from the sidebar

In all cases the .jsonl file and conversation history survive, but the UI shows the session as "Temporary". This is a recurring issue on Windows — it has happened across multiple versions.

extent analysis

TL;DR

Manually appending a title entry to the .jsonl file or implementing a fallback title mechanism can make sessions recoverable from the UI.

Guidance

  • Verify that the .jsonl file exists and contains conversation history, but lacks an ai-title or custom-title entry.
  • Consider implementing a fallback title mechanism that displays the first user message as the title when ai-title or custom-title is missing.
  • To mitigate the issue, ensure that title generation is completed and flushed to disk before the app closes, or implement a retry mechanism for title generation.
  • Investigate why the title entry is not being written or is being lost during app updates or abrupt closures.

Example

{"type":"ai-title","aiTitle":"First User Message","sessionId":"<uuid>"}

This example shows a potential fallback title entry that could be appended to the .jsonl file.

Notes

The issue appears to be related to the app's title generation and persistence mechanism, and may be specific to the Windows platform. The provided workaround suggests that manually appending a title entry can resolve the issue, but a more robust solution may be needed to handle different scenarios and edge cases.

Recommendation

Apply workaround: Manually appending a title entry to the .jsonl file can make sessions recoverable from the UI, but a more permanent solution should be implemented to handle title generation and persistence issues.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING