> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slaunt.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Slaunt with Claude Code

> Claude Code setup for Slaunt: installer or claude mcp add, the hooks that drive the lifecycle, and tool_authorize decisions.

Use the installer. It adds the server and the hooks, and the hooks are what make Claude Code show up reliably in Quaero and actually stop when stopped:

```bash theme={null}
npx --yes slaunt@latest install --client claude
```

Manual setup gets you the tools but no hooks, so the model has to call `thread_begin`/`run_begin`/`run_end` itself (install [agent instructions](https://docs.slaunt.ai/clients/agent-instructions.md) so it does):

```bash theme={null}
claude mcp add --transport http slaunt https://central-mcp-ccr-production.up.railway.app/mcp
```

Then run `/mcp`, pick `slaunt`, and choose Authenticate.

## What the hooks do

| Hook | Effect |
| - | - |
| `UserPromptSubmit` | Binds the thread if needed, starts a run, captures the prompt |
| `PreToolUse` | Calls `tool_authorize`; a deny blocks the tool call |
| `PostToolUse`, `SubagentStart`, `SubagentStop` | Report activity, capture tool I/O |
| `Stop` | Captures the final message and ends the run |
| `SessionStart` (`clear`, `compact`) | Re-binds after `/clear` or compaction |

Claude Code fires the first `SessionStart` before MCP servers connect, which is why `UserPromptSubmit` handles initial binding.

Because the hook owns the run, a model-issued `run_begin` while it's `RUNNING` fails with `-32602`. Agent instructions written for hook-less clients can trigger this; it's harmless but noisy.

## tool\_authorize decisions

The `PreToolUse` guard is how stops take effect mid-turn. If a tool call is unexpectedly blocked, the reason tells you why:

| Reason | Decision | Meaning |
| - | - | - |
| `runtime_authorized` | allow | Run is active and in scope |
| `runtime_stopped` | deny | Stopped from Quaero or KillBar. The next prompt starts a fresh run. |
| `run_not_active` | deny | No run is `RUNNING`, usually because `UserPromptSubmit` failed. Restart Claude Code. |
| `stale_turn` | deny | Hook belongs to an earlier turn |
| `scope_mismatch` | deny | Hook session doesn't match the authenticated connection |
| `invalid_metadata` | deny | Hook payload is missing fields |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.