# pi · Result checks

> Levels are per column and must not be summed, averaged or ranked. A level states which written criterion the runtime's source meets. It is not a measure of quality or task success. Higher is not always preferable.

Source: "Agent runtime comparison: ten open-source agent runtimes, source review", study of 2026-11-28. Mark notation: `3` is the level in the default deployment; `1→4 [opt: …]` is level 1 by default and level 4 in the named configuration; `s` source-verified, `d` documented or test only. Service dependencies are classes (E embedded, O on demand, R resident service, X external server required), not levels.

- Runtime: [pi](https://ai-agents-review.com/runtime/pi.md)
- Column: [Result checks](https://ai-agents-review.com/column/result-checks.md) (Operations and verification)
- Mark: 2 s
- Default deployment: 2
- Best supported configuration: 2
- Page: https://ai-agents-review.com/cell/pi/result-checks

## Rationale

Extension hooks can block or force another turn, with no stated cap; arguments are validated structurally

## Rubric criteria for this column

- 0: No result checks
- 1: Structural checks only (schema on tool args/output, or structured final output), with no hook for result checks
- 2: Owner-defined checks available (Stop/finalize hooks, check scripts), but on failure the answer is released after a cap or fails open
- 3: Owner-defined checks where failure either blocks release with an error **or** re-prompts with a stated cap and records the outcome
- 4: Level 3, plus checks available by default (a built-in verifier or default check) **and** retry/release policy configurable per check

## Review finding

Built in: TypeBox validation of tool arguments; failures and blocked calls return `isError` to the model. Tools may declare `outputSchema`/`structuredContent`; no runtime validation found. Extension hooks can block, rewrite results or force another turn. No built-in correctness check. [O105][O106][O107][O108]

## Evidence cited by the mark

- [O105] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/agent/src/agent-loop.ts#L734-L746 — `validateToolArguments` before `beforeToolCall` hook — [S]
- [O108] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/coding-agent/src/core/extensions/types.ts#L1051-L1058 — `turn_end` / `agent_before_settle` BoundaryResult can append entries and force another request — [S]

## Evidence also cited by the review finding

- [O106] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/agent/src/agent-loop.ts#L806-L816 — Validation errors / blocked calls returned as `isError: true`, never thrown — [S]
- [O107] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/agent/src/types.ts#L430-L438 — `structuredContent` "matching the tool's outputSchema" for programmatic callers; not sent to model — [S]

## Grading record

- Grader A (default / best): 2 / 2
- Grader B (default / best): 2 / 2
