claude-code - 💡(How to fix) Fix Live session title refresh when hook returns hookSpecificOutput.sessionTitle [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#53023Fetched 2026-04-25 06:14:27
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1
RAW_BUFFERClick to expand / collapse

Problem

When a UserPromptSubmit hook returns hookSpecificOutput.sessionTitle, Claude Code Desktop does not update the displayed title until the app is fully quit and relaunched. The title is correctly persisted to the session sidecar at ~/Library/Application Support/Claude/claude-code-sessions/<workspace>/<project>/local_<uuid>.json, but Desktop reads this file only at startup — it doesn't watch for changes.

This makes the official sessionTitle hook field effectively useless for any automation that wants live, per-turn renaming (e.g. titling a session from a Topic line in the assistant's output).

Environment

  • Claude Code CLI: 2.1.119
  • Claude Desktop bundled Claude Code: 2.1.111
  • Claude.app: 1.3883.0
  • macOS 24.6.0

Repro

  1. Configure a UserPromptSubmit hook that emits {"hookSpecificOutput": {"hookEventName": "UserPromptSubmit", "sessionTitle": "NewTitle"}}.
  2. Submit a prompt in Desktop. Observe the sidecar JSON on disk — title is updated.
  3. Desktop's displayed title (sidebar + header) remains the old Haiku-generated title.
  4. Quit Desktop (⌘Q) and relaunch — title now shows correctly.

Requested

Have Desktop either:

  • Watch the session sidecar JSON and re-render title on change, OR
  • Emit an in-app event when the CLI subprocess reports a hook-set sessionTitle so the UI refreshes live.

Related open issues

  • #29355
  • #33165
  • #35316

extent analysis

TL;DR

To fix the issue, Claude Desktop needs to either watch for changes in the session sidecar JSON file or emit an in-app event when the CLI subprocess reports a hook-set sessionTitle.

Guidance

  • The problem lies in the fact that Claude Desktop only reads the session sidecar file at startup and does not watch for changes, making the sessionTitle hook field ineffective for live renaming.
  • To mitigate this, the Desktop application could be modified to periodically check the sidecar file for updates or implement a file watcher to detect changes.
  • Another possible solution is to emit an in-app event when the CLI subprocess reports a hook-set sessionTitle, allowing the UI to refresh live.
  • The requested changes would require modifications to the Claude Desktop application, potentially involving updates to the file handling or event emission mechanisms.

Example

No code snippet is provided as the issue does not contain sufficient information about the implementation details of Claude Desktop.

Notes

The solution may depend on the specific implementation of Claude Desktop and the underlying technologies used. The provided information only describes the issue and the desired behavior, without giving insight into the internal workings of the application.

Recommendation

Apply a workaround by modifying the Claude Desktop application to watch for changes in the session sidecar JSON file or emit an in-app event when the CLI subprocess reports a hook-set sessionTitle, as this would allow for live updating of the session title without requiring a full restart of the application.

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

claude-code - 💡(How to fix) Fix Live session title refresh when hook returns hookSpecificOutput.sessionTitle [1 comments, 2 participants]