DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to block Claude Code from ending a session with unmet gates with Unlazy

Install an optional Stop hook that holds the session open while gates remain unmet.

Short answer: Run npx skills add Leonxlnx/unlazy to install the skill, then confirm the ledger exists as GATES.md or under .unlazy/; then run node /scripts/install-hooks.mjs to write the hook into .claude/settings.local.json, after you consent to the install; add .claude/settings.local.json, .unlazy/, and .unlazy-hook-state.json to the project's ignore rules. All steps.

Authorization notice. Unlazy is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.

Who it is forA Claude Code user running a long task who keeps seeing the agent stop before its own gates pass.

The problemThe agent can end a session while gates are still unmet, and the user only learns this after reviewing the result.

The outcomeA Stop hook in local Claude Code settings that returns a block decision while gates or launch waves are incomplete.

What you need first

  • 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

Steps

  1. Run npx skills add Leonxlnx/unlazy to install the skill, then confirm the ledger exists as GATES.md or under .unlazy/.
  2. 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)
  3. Add .claude/settings.local.json, .unlazy/, and .unlazy-hook-state.json to the project's ignore rules.
  4. Run a Claude Code session on the task and confirm the hook blocks exit while a gate is unmet.
  5. Run node /scripts/install-hooks.mjs --uninstall when the task is done to remove the hook. (inferred, check the README)

Prompt for your agent

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.

Caveat. The hook's progress guard releases after six consecutive blocks without gate progress, so it will not hold a session open indefinitely.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for Leonxlnx/unlazy and "Block Claude Code from ending a session with unmet gates"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer