{"version":"2.1.299","anchor":"hook-spawn-cloud-sessions-without-a-disk-and-shell-prefix-h","canonical_anchor":"hook-spawn-cloud-sessions-without-a-disk-and-shell-prefix-h","heading":"Hooks that can't run in cloud sessions now say why","tier":"notice","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299\/e\/hook-spawn-cloud-sessions-without-a-disk-and-shell-prefix-h","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299","markdown":"### Hooks that can't run in cloud sessions now say why\n\nHooks that can't run in a cloud session or fail on another machine now return a clear reason, and shell prefix handling for plugin and skill hooks changed\n\n**What**\n\nHooks are your own scripts or commands that Claude Code runs at set points, such as before a tool runs. Several things changed in how they are started:\n\n- A hook that can't run in a cloud session, or in a session without a local disk, now returns the reason `unsupported_in_cloud_session` instead of a plain failure.\n\n- A hook that fails while running on another machine returns `remote_run_failed`.\n\n- For hooks from plugins and skills, `CLAUDE_CODE_SHELL_PREFIX` is now worked out only when it is needed. This does not apply to the status line or file suggestion hooks.\n\n- A PowerShell hook that does not set a `shell` now shows a notice, once.\n\n**Why**\n\nWhen a hook fails in a cloud session, the reason now tells you whether it can't run there at all or failed on the other machine, which makes the problem easier to track down.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}