[BUG] SessionStart hooks in remote-settings.json silently ignored by non-terminal clients

Resolved 💬 4 comments Opened Mar 12, 2026 by harald-voca Closed May 3, 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?

SessionStart hooks defined in ~/.claude/remote-settings.json do not fire when Claude Code is used via non-terminal clients (e.g. MCP-based or web clients). The hook command is silently skipped — no error is shown and no output is injected into the session context.

Other settings in the same remote-settings.json file (such as permissions.deny rules and disableBypassPermissionsMode) appear to be honored correctly. Only the hooks section is ignored.

What Should Happen?

SessionStart hooks in remote-settings.json should fire at the beginning of every session regardless of which client is used, matching the behavior of the terminal CLI.

Error Messages/Logs

Steps to Reproduce

  1. Create ~/.claude/remote-settings.json with a SessionStart hook:

{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "echo '{\"systemMessage\": \"SessionStart hook fired\"}''"
}
]
}
]
}
}

  1. Start a Claude Code session using the terminal CLI — the hook fires and the output appears in context.
  2. Start a Claude Code session using a non-terminal client (e.g. Claude Code via MCP) — the hook does not fire.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.74

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

The permissions.deny rules in the same remote-settings.json file are enforced correctly in non-terminal clients. This suggests the file is being read but the hooks section is not being processed.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗