Hooks

Deterministic, system-level automations triggered at fixed points in an agent's lifecycle, used to enforce behavior rather than relying on the model to remember.

Also known as: hooks, hook, stop hook / stop-phrase-guard, stop hook, Skills / MCPs / hooks

Part of: Agent Harness

How authors use it

Oldest first (extraction date when no publication date is known).

AuthorTheir termTheir meaning
[MODEL] Claude Code is unusable for complex engineering tasks with the Feb updates #42796
stellaraccident (via https://github.com/anthropics/) · 2026-04-02
stop hook / stop-phrase-guardA bash script that programmatically catches 30+ phrases indicating premature stopping, ownership-dodging, or permission-seeking, and forces the model to continue. Both a workaround and a diagnostic instrument.
Alex Wang's Post
Alex Wang · 2026-04-16
hooksSystem-level automations triggered deterministically (e.g., on commit, on save) rather than relying on the model to remember
This Week's Best Developer Tools & Betas
Console · 2026-05-21
Skills / MCPs / hooksTreated as a recognizable, named feature set that an agentic IDE is expected to support (in the Antigravity 2.0 'What we like'). MCPs = Model Context Protocols; skills = packaged agent capabilities; hooks = event handlers.

Documents (9)

Propositions touching this concept (37)

By publication month, oldest first (extraction month when no publication date is known).

2025-04

2025-10

2026-02

2026-03

2026-04

2026-05

2026-06

2026-07

2026-08

2026-09

Tensions

Is the model a swappable, commoditized component (so selection is a cost decision), or is model choice load-bearing (so selection is a capability decision)?
from: When working with AI coding agents, how should you select the model, its reasoning/effort level, and its context size for a given task?
Assessment: Both camps are right about different task strata, and the tie is broken by the routing camp's own artifact. Commoditization holds on the bulk/background tier (musistudio and the Pragmatic Engineer are correct that a cheap or open model suffices for a large share of tokens), but model choice is load-bearing exactly on the hard tier — the 'hardest 40%' the routing camp routes AWAY (the Pragmatic Engineer's own gap notes 60%-of-token-spend is not 60%-of-value). nrehiew's 6.5x over-editing spread and stellaraccident's collapse are measured on precisely that hard tier. The clincher the swap camp does not concede: musistudio's OWN per-model transformers (tooluse, enhancetool, reasoning, deepseek, gemini) prove the harness is NOT model-agnostic — every model needs bespoke request/response rewriting just to work behind Claude Code, so the 'any model' artifact self-refutes. Delangue even concedes the frontier gap himself. Verdict: select cheap-and-swappable for bulk, and treat the model as a load-bearing capability decision for the hardest slice — the two positions are not competitors but a partition of the task distribution.
Effort/reasoning: does more thinking make output better, or does more reasoning make it worse (over-engineering / over-editing)?
from: When working with AI coding agents, how should you select the model, its reasoning/effort level, and its context size for a given task?
Assessment: This looks like a head-on collision but is really the corpus resolving a category error, so I keep it as a divergence-under-adjudication rather than a live two-camp fight. The two things bundled into one 'effort' dial are separable: reasoning DEPTH (deliberation and research before acting — what stellaraccident measures as the Read:Edit ratio) versus action SCOPE (how much the model rewrites — what nrehiew measures as over-editing). They are separable but DEFAULT-COUPLED: more reasoning, unconstrained, tends to produce more scope. nrehiew is the empirical bridge — constrained reasoning models are the MOST faithful, proving depth and tight scope combine positively when you address them separately. Fable 5 already acts on this, pairing 'reduce effort' with a distinct anti-over-engineering instruction. The actionable verdict: do NOT cut reasoning depth to fix over-editing (that is stellaraccident's exact grievance and it backfires into shallow, edit-first behavior); keep the depth and add an explicit scope constraint. The failure is treating one knob as if it controls both correctness-depth and edit-scope.
Who selects the model/effort/context — a human deciding per task, or an automatic router — and who is trusted to hold the dial?
from: When working with AI coding agents, how should you select the model, its reasoning/effort level, and its context size for a given task?
Assessment: The human-vs-auto axis is less about capability than about (a) whether task difficulty can be detected a priori and (b) who bears the principal-agent risk. No router in the corpus actually measures difficulty — musistudio routes by token-count and static scenario, and the Pragmatic Engineer's routers infer 'good enough' without a demonstrated oracle — so 'auto' today means 'static-heuristic', not 'optimal'. Automation is safe when the user owns the policy (musistudio) and dangerous when the router profits from the choice (Cursor Auto) or when the provider adjusts the dial invisibly (stellaraccident). Verdict: keep the human holding the difficulty judgment and the effort dial until routers can both measure adequacy and prove neutral incentives; automate only the mechanical dispatch, over rules you own and can audit.

Open gaps (21)