Hook · Work Management Studio
Close your task claim before finishing
Stops a turn from ending if this session still holds its own active task claim in an opted-in repository, asking it to be released or updated first.

When it steps in
Runs on the Stop event in Codex, when a turn is about to finish.
Codex · Project opt-in
Requires Codex to have loaded and trusted the plugin, plus a valid, enabled repository coordination marker; also requires the current session to actually hold an active claim.
What you can expect
If the assistant’s session still owns an active task claim, it receives a blocking message to release or update that claim before finishing. No active claim means no block.
How the workflow unfolds
- 01
Validate the stop context
Checks the Stop event, session id, and working directory, and confirms the repository marker is valid and enabled.
- 02
Read the session's own claim
Looks only at the claim record matching this exact session id, ignoring all other tasks.
- 03
Block if still active
If that claim is valid and still active, returns a blocking decision asking the session to release or update it before stopping.
You stay in control
Release the session’s own claim when its work is finished, or mark the claim blocked when the task is genuinely blocked. Leaving it active keeps the guard in place. Repository coordination and your AI app’s hook settings control whether the guard is used.
Know the limits
Codex-only; no Claude Code Stop registration exists for this. Only ever acts on this session's own claim, never on other tasks, and never on a claim already marked blocked. Malformed input, recursive Stop events, or any exception all pass through quietly without blocking.
Technical details and sources
Based on version 0.5.1. These declarations describe the package; they do not confirm that your AI app has enabled or run the hook.
Show events and release source files
- Codex
- Stop


