Skip to the content.

JIT-Reminder via Hooks as Recency Strategy

Static instruction placement (system prompt, AGENTS.md) anchors behavior via primacy. But high-frequency rules that are still violated need recency reinforcement — content at the end of the context, right before generation.

The Pattern

Use agent runtime hooks to block incorrect tool calls and inject a targeted reminder as the block reason. The block reason appears as the last tool response in conversation history — the recency zone.

User: "hey setup crc monitoring"
  ↓
Hook: detect-hey.sh → flag SET (unmatched signal)
  ↓
Model tries: shell("crc setup...")
  ↓
Hook: enforce-hey.sh → BLOCK
  → Block reason: "Follow Signal Dispatch rule: first tool call
    MUST be search_nodes. You CAN and SHOULD call search_nodes now."
  ↓
Model reads block reason (recency zone) → calls search_nodes

Properties

Property Value
Injection position Recency zone (last content before generation)
Targeting Contextual — only fires when the specific rule is violated
Token cost 3–5 lines when active, 0 when not triggered
Enforcement level Deterministic — hook blocks the tool call at runtime
Graceful degradation One-shot — flag cleared after first block to prevent infinite loops

Comparison with Static Approaches

Approach Position Always present? Token cost Enforcement
System prompt rule Primacy Yes Every turn Prose only
MOIM / persistent instruction Primacy Yes Every turn Prose only
AGENTS.md rule Primacy Yes Every turn Prose only
JIT-Reminder (hook) Recency Only when violated On violation only Deterministic

Implementation

AgentFS v7 implements this via the signal-dispatch plugin:

Harvested From

Project Source Entry
context-eng Session: Context Landscape Analysis Discovery that MOIM has no recency advantage; hook-based reminders achieve actual recency placement
agentfs-kgm-skill-dispatch MEMORY.md KGM dispatch enforcement architecture

Implications