Claude Code
Connect Claude Code to Kastra policies and verify the hook boundary.
On this page
Prerequisites
Install Edge, install Claude Code, and sign in to the intended Kastra workspace. Use a test environment for initial policy checks.
Connect the hook
kastra-edge login
kastra-edge install-claude --dry-run
kastra-edge install-claude
kastra-edge doctor
The installer targets ~/.claude/settings.json. Review its proposed change and restart the agent so it loads the new configuration. Keep unrelated hooks intact.
What is governed
Claude Code PreToolUse performs the pre-action check. PostToolUse is an audit event after execution. Prompt and session hooks carry their own context; they do not turn the hook into the proxy content-scanning engine.
The hook calls Kastra’s service before the supported action. Work outside the hook is not governed. Network or harness failures can allow work to continue under the integration’s failure behavior; read failure handling.
Verify the connection
Run a harmless action and inspect the exact decision in the console. Then test a narrow deny rule and a HOLD rule in your test environment. Confirm the actual side effect, not only the banner or notification. Verification checklist.
Operational notes
Installing Claude Code hooks also configures usage telemetry by default. Review telemetry and collection before rollout. The Claude plugin is a separate read-only inspection experience.
If no decision appears, check the hook file, PATH, login, environment, agent restart, and troubleshooting guide. Installation detection alone cannot prove that the host invoked the hook.