Introduction

What Caret is, what it does, and why AI coding agents need a supervisor.

What is Caret?

Caret is a reliability platform for AI coding agents. It sits between your prompt and the agent's execution, evaluating every tool call in real time. When the agent drifts from what you asked — editing the wrong files, stuck in retry loops, burning tokens on a simple task — Caret catches it and intervenes.

One-line pitch: Caret enforces your intent on every tool call your coding agent makes, detects drift in real time, and blocks dangerous actions before they execute.

Why agents need supervision

AI coding agents are powerful but unreliable. In our beta data across 2,400+ sessions, 73% of agent sessions experience at least one drift event. Common patterns include:

  • Scope drift: You ask the agent to fix auth, and it starts rewriting your database schema.
  • Retry loops: The agent gets stuck editing the same file over and over, burning tokens.
  • Cost runaway: A "fix typo" task costs $2 because the agent over-engineers the solution.
  • Destructive actions: rm -rf, DROP TABLE, force push to main.
  • Approach drift: The agent rewrites an entire module when a one-line fix would do.
  • Hallucination drift: The agent imports non-existent packages or calls APIs that don't exist.

Without Caret, you are the supervisor. You check the terminal, switch back when something looks wrong, and hope you catch drift before the damage is in the diff. Caret automates that supervision.

What Caret is not

  • Not a code-quality tool. CI does that, after the fact. Caret catches drift before the code is committed.
  • Not an LLM observability tool. Braintrust and Langfuse record completions. They don't intervene.
  • Not a policy engine. Endor Labs blocks dangerous actions. Caret catches "safe but wrong" actions.
  • Not a logger. Loggers are passive. Caret acts.

How it works

🖼 Architecture overview — Intent capture, supervision pipeline, and intervention flow
Caret architecture: from prompt to intervention

Caret installs three hooks into your AI coding agent:

  1. UserPromptSubmit: Captures your prompt as a structured intent record — action, file scope, keywords, constraints.
  2. PreToolUse: Before every tool call, Caret evaluates whether the action aligns with your intent.
  3. PostToolUse: After every tool call, Caret updates the session health score and checks for drift patterns.

Detection runs in three tiers: rule-based patterns (<10ms), heuristics (<50ms), and optional LLM evaluation. Caret is designed to never be the bottleneck — if the supervisor crashes, the agent continues normally (fail-open design).

Supported agents

  • Claude Code — full support via hooks API
  • Cursor — full support via rules and hooks
  • Codex — full support via CLI wrapper
  • Aider — full support via CLI wrapper
  • Continue — community support
  • Any CLI-based AI coding agent via caret run

Next steps

Was this helpful?