{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "leonxlnx-unlazy--keep-claude-code-from-stopping-early",
 "repo": "Leonxlnx/unlazy",
 "repo_url": "https://github.com/Leonxlnx/unlazy",
 "repo_slug": "leonxlnx-unlazy",
 "title": "Block Claude Code from ending a session with unmet gates",
 "page_title": "How to block Claude Code from ending a session with unmet gates with Unlazy",
 "summary": "Install an optional Stop hook that holds the session open while gates remain unmet.",
 "who": "A Claude Code user running a long task who keeps seeing the agent stop before its own gates pass.",
 "problem": "The agent can end a session while gates are still unmet, and the user only learns this after reviewing the result.",
 "outcome": "A Stop hook in local Claude Code settings that returns a block decision while gates or launch waves are incomplete.",
 "steps": [
  "Run `npx skills add Leonxlnx/unlazy` to install the skill, then confirm the ledger exists as GATES.md or under .unlazy/.",
  "Run `node /scripts/install-hooks.mjs` to write the hook into .claude/settings.local.json, after you consent to the install. (inferred, check the README)",
  "Add .claude/settings.local.json, .unlazy/, and .unlazy-hook-state.json to the project's ignore rules.",
  "Run a Claude Code session on the task and confirm the hook blocks exit while a gate is unmet.",
  "Run `node /scripts/install-hooks.mjs --uninstall` when the task is done to remove the hook. (inferred, check the README)"
 ],
 "agent_prompt": "Use the unlazy skill in the repo <repo-path> to keep this Claude Code session on <task-name> until its gates pass. Run node /scripts/install-hooks.mjs, then run the session and report whether the Stop hook blocked exit while gates were unmet. Verify that .claude/settings.local.json is listed in the project's ignore rules.",
 "agents": [
  "claude-code"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "The hook's progress guard releases after six consecutive blocks without gate progress, so it will not hold a session open indefinitely.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "javascript",
 "requirements": [
  "Node.js 16 or newer",
  "An AI agent that supports skills, such as Claude Code or Codex CLI",
  "A repository with a task to verify and shell commands the gates can run"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/leonxlnx-unlazy/keep-claude-code-from-stopping-early/",
 "md": "https://dedupedai.com/use-cases/leonxlnx-unlazy/keep-claude-code-from-stopping-early/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/leonxlnx-unlazy--keep-claude-code-from-stopping-early.json",
 "api_version": "v1"
}
