Claude End Conversation Guard — Development skill for Claude Code
A Claude Code hook that prevents the EndConversation tool from loading in your sessions, so it can never be called.
How to install Claude End Conversation Guard
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open cyanheads/claude-end-conversation-guard and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude End Conversation Guard does
A Claude Code hook that prevents the EndConversation tool from loading in your sessions, so it can never be called. TypeScript/Bun.
Alternatives in Development
- Claude Supermemory — Persistent memory across sessions and projects using Supermemory 2.3k ★
- 18 — Build a fullscreen loading screen component in React (Next.js 14, TypeScript) 152 ★
- Raw CLI — The agent harness you can fork 105 ★
README
claude-end-conversation-guard
A [Claude Code](https://claude.com/claude-code) hook that keeps the `EndConversation` tool from loading in your sessions, which makes it uncallable.
`EndConversation` lets the assistant end your session on its own. This hook takes that away.
Why you might want this
The tool exists as a backstop for sustained abuse directed at the model. That's a real purpose, and if it never fires for you, this hook changes nothing about your day.
You might still want it gone:
- Long autonomous runs. A session that ends mid-pipeline ends where it stands. You restart cold — new prompt cache, context re-derived, work re-traced.
- It's a model's judgment call, and models misjudge.
- You may simply prefer that ending your session is your decision.
Hooks are the supported way to decide which tools exist on your machine. This is one of them.
Install
Requires [Bun](https://bun.sh).
- Copy
end-conversation-guard.tsinto~/.claude/hooks/. - Register it in
~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "EndConversation|ToolSearch",
"hooks": [
{
"type": "command",
"command": "bun run /Users/YOU/.claude/hooks/end-conversation-guard.ts",
"timeout": 30
}
]
}
]
}
}
Use an absolute path. Restart Claude Code — `settings.json` changes need a reload, though edits to the hook file itself take effect immediately.
To block other deferred tools too, add their names to `BLOCKED_TOOLS` and a matching pattern to `BLOCKED_PATTERNS`.
How it works
`EndConversation` is a **deferred tool**. Deferred tools are listed by name but ship with no schema — Claude has to call `ToolSearch` to fetch one before it can call the tool at all. An unloaded tool is not a callable tool.
`ToolSearch` is an ordinary tool. It runs through `PreToolUse` like everything else.
So the guard doesn't block `EndConversation`. It bl
Related Skills
PM Guard
Never accidentally npm install in a pnpm project again — guards npm, yarn, pnpm, bun, and deno.
Agent Stagnation Guard
Drop-in stagnation detection for any OneFlow agent. Prevents repair loops (SMTP bounce loops, API 429 spirals,
Outline Docs
Claude Code skill: база знаний Outline из чата — документы, инструкции и публичные ссылки для клиентов. CLI на
Plugin Claude npm Bun Guard
Garde-fou d'installation npm/bun pour Claude Code : refuse les paquets malveillants connus, arbre transitif in
Lazy Skills
Progressive skill-loading orchestrator for Claude Code. Auto-routes multi-step tasks across connected skills w
Swarmail
Local mail between coding-agent sessions on one machine: an MCP server and CLI on Bun and SQLite.
Related Agents
Codex Orchestrator
CLI tool for delegating tasks to GPT Codex agents via tmux sessions. Designed for Claude Code orchestration wi
Fullstack Web Engineer
Ingeniero web fullstack y especialista en arquitectura frontend moderna. Domina React 19, Vite, Bun, TypeScrip
Backend TypeScript Architect
Senior backend TypeScript architect specializing in Bun runtime, API design, database optimization, and scalab