claude-code - 💡(How to fix) Fix SessionStart hook systemMessage renders as dismissable dialog (not inline) when remote-control is active [1 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#52775Fetched 2026-04-25 06:21:17
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×5

Fix Action

Workaround

None available at the hook level. The only option is to disable remoteControlAtStartup and enable remote control manually after startup, which defeats the purpose of the setting.

Code Example

{ "remoteControlAtStartup": true }

---

{
     "SessionStart": [{
       "hooks": [{
         "type": "command",
         "command": "echo '{\"systemMessage\": \"Session context loaded\"}'"
       }]
     }]
   }
RAW_BUFFERClick to expand / collapse

Bug Description

When remoteControlAtStartup is enabled (or /remote-control is active), the systemMessage output from a SessionStart hook does not render inline at startup like it does in normal mode. Instead, it appears late — as a dismissable dialog/overlay — after the user has already been presented with the prompt and begun interacting.

Steps to Reproduce

  1. Enable remote control at startup in ~/.claude/settings.json:
    { "remoteControlAtStartup": true }
  2. Add a SessionStart hook that outputs a systemMessage:
    {
      "SessionStart": [{
        "hooks": [{
          "type": "command",
          "command": "echo '{\"systemMessage\": \"Session context loaded\"}'"
        }]
      }]
    }
  3. Start claude in the terminal.

Expected Behavior

The systemMessage from the SessionStart hook appears inline in the terminal immediately after startup — the same way it does when remote-control is not active.

Actual Behavior

  • At startup, the remote-control banner is shown (/remote-control is active · Code in CLI or at https://...) and the prompt is presented immediately.
  • The systemMessage from the hook either:
    • Does not appear at all until the user types something and dismisses a dialog, or
    • Appears mid-session as an overlay, interleaved with terminal rendering (causing visual corruption if the user has already started typing).

Environment

  • Claude Code v2.1.119
  • macOS (Darwin 25.2.0)
  • Hook type: SessionStart
  • Hook output format: {"systemMessage": "..."}
  • Setting: remoteControlAtStartup: true

Impact

SessionStart hooks are commonly used to display session context (loaded config, memory files, active skills, etc.) so the user can verify their environment at a glance. This renders the hook effectively non-functional in remote-control mode — the primary mode many users run in.

Workaround

None available at the hook level. The only option is to disable remoteControlAtStartup and enable remote control manually after startup, which defeats the purpose of the setting.

extent analysis

TL;DR

The issue can be mitigated by modifying the SessionStart hook to handle the remoteControlAtStartup mode differently, potentially by using a different output format or delaying the output.

Guidance

  • Investigate the SessionStart hook's output handling when remoteControlAtStartup is enabled to determine if there's a specific condition that causes the systemMessage to be delayed or displayed as an overlay.
  • Consider modifying the hook to check for the remoteControlAtStartup setting and adjust its output accordingly, such as using a different message format or timing.
  • Review the Claude Code documentation for any specific guidelines or recommendations for handling systemMessage output in SessionStart hooks when remoteControlAtStartup is enabled.
  • Test the hook with different output formats, such as plain text instead of JSON, to see if it affects the rendering of the systemMessage.

Example

No code example is provided as the issue is more related to the hook's behavior and output handling rather than a specific code snippet.

Notes

The issue seems to be specific to the remoteControlAtStartup mode and the SessionStart hook's output handling. The provided workaround of disabling remoteControlAtStartup and enabling it manually after startup is not ideal, so a more targeted solution is needed.

Recommendation

Apply a workaround by modifying the SessionStart hook to handle the remoteControlAtStartup mode differently, as there is no clear indication of a fixed version that addresses this issue. This approach allows for a more targeted solution that can be implemented without waiting for a potential fix in a future version.

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 SessionStart hook systemMessage renders as dismissable dialog (not inline) when remote-control is active [1 participants]