Skip to content

Mid-session hook configuration reload (settings.json + hook-script bodies) #55867

Description

@TroyBertolino

Feature request

Add a mechanism for mid-session hook configuration reload so edits to
~/.claude/settings.json or hook-script bodies take effect without exiting
the session and re-launching via claude --resume.

Use cases

  1. Iterating on hook scripts during development. Current loop:
    edit hook script → exit session → claude --resume → test → repeat.
    The exit/resume round-trip is the single biggest friction point in
    authoring SessionStart, UserPromptSubmit, Stop, and PostToolUse hooks.

  2. Picking up settings.json edits made by parallel sessions or by
    skill-driven config changes
    (e.g., an update-config skill that
    adds a permission rule mid-session — currently the change doesn't
    take effect until next session).

  3. Recovering from a misconfigured hook without losing in-flight
    session context. A blocking UserPromptSubmit hook with a typo
    currently requires session restart, which discards conversation
    memory built up over hours of work.

Proposed UX (any one of these would close the gap)

  • /reload-hooks built-in slash command — explicit, operator-
    triggered, predictable. Lowest implementation cost.
  • Automatic file-watcher on settings.json + hook-script paths
    zero-friction; matches nodemon / watchexec precedent.
  • SIGHUP-equivalent process signal — Unix-idiomatic; matches
    nginx -s reload, systemctl reload, shell hash -r. Useful for
    tooling integration (e.g., a watcher process external to Claude Code).

Prior art

  • nginx -s reload / systemctl reload <unit> (signal-based config reload)
  • Shell hash -r (PATH cache invalidation)
  • nodemon / watchexec / air (file-watcher dev loops)
  • VS Code "Reload Window" command

Acceptance criteria

  • Mechanism re-reads ~/.claude/settings.json (and project-local
    settings.local.json) without restarting the session.
  • Hook scripts referenced by the new config are invoked correctly
    on the next matching event.
  • In-flight session state (conversation history, memory, working
    directory) is preserved across the reload.
  • Failure mode is graceful — a malformed settings.json does not
    crash the session; old config remains active until reload succeeds.

Filed from

Operator-friction encountered during hook-driven workflow development
in @TroyBertolino's private project (2026-05-03).

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions