Skip to content

kurt init installs PreToolUse and PostToolUse hooks in .claude/settings.json that send HTTP requests to the Kurt web API #95

@dkrevitt

Description

@dkrevitt

For every Edit/Write/Update tool call. These hooks are intended for the approval workflow in the Kurt web UI, but they fire in
all Claude Code sessions — including regular terminal usage where kurt serve isn't running.

Each hook call hangs waiting for a response that
never comes, causing two blocking HTTP requests per tool use that stack up and burn CPU/memory.

Potential fix: Adding a guard ([ -z "$KURT_SESSION_PROVIDER" ] && exit 0) to the PreToolUse and PostToolUse hook commands. The Kurt web UI already sets KURT_SESSION_PROVIDER when spawning Code Sessions, so the hooks now no-op immediately in standalone terminal sessions while continuing to work as intended when launched from the web UI.

Files to change:

  • src/kurt/agents/claude-settings.json (template for future kurt init)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions