# FormalClaw: Reliable Agent Communication through Verification-Grounded Protocol

> FormalClaw makes agent hand-offs into contracts with obligations checked against evidence through four tiers. On ClawArena, Qwen3.5-2B scored 35.86% versus 17.50% for natural-language feedback; each refinement arm got five attempts and benchmark-native feedback each round.

- arXiv: https://arxiv.org/abs/2612.00411
- Authors: Hantao Lou, Xinxiong Wu, Jiayi Zhou, Yaodong Yang
- Published: 2026-12-02
- Topic: Agents
- Visual carousel: https://instaxiv.com/p/2612.00411
- Explanation by InstaXiv, a secondary educational summary. Cite the original paper for exact results. InstaXiv is not affiliated with or endorsed by arXiv or Cornell University.

## Can an agent hand-off carry evidence, not just instructions?

**2.05×** ClawArena score vs natural language, Qwen3.5-2B

## Reliability can drift between instruction and action

**Unstructured hand-off:** A common path sends free-form instructions through tools or agents, then asks a judge after execution whether constraints survived.

**FormalClaw:** FormalClaw sends a contract forward at each hand-off; the executor returns output and evidence for verifier checks across delegation, coordination, or refinement, without formalizing the whole environment.

Check the hand-off, not just the final answer.

## A hand-off becomes a checkable loop

![Figure 2](https://cdn.instaxiv.com/figures/2612.00411/figure2.webp)

Panel (a) traces instruction → specifications → execution with evidence → verifier feedback. Panel (b) decomposes the request into grounded atomic requirements for tiered checks. (Figure 2)

## What a contract carries, and what gets checked

1. **Define the contract**: A contract pairs context with obligations: what must hold, where to look, and what evidence is due.
2. **Assign an evidence tier**: Assign each clause a tier: trace evidence, executable monitor, symbolic constraint solver (SMT), or proof-kernel check; tasks can mix them.
3. **Verify the return**: The verifier receives output, evidence, and trace; it accepts only if every clause passes and names failures for repair.
4. **Gate experiments**: Tool-call checks run before commitment and final-output checks after return; blocked calls have no side effects.

## Five attempts, nearly double the score

| Method | ClawArena score (%) |
| --- | --- |
| Natural-language refinement | 17.50 |
| Structured (Python) feedback | 15.11 |
| **FormalClaw (+18.36 pts)** | **35.86** |

_ClawArena main table: Qwen3.5-2B avg_score, 1,855 scored rounds; all refinements use 5 attempts and native per-round feedback._

## Guidance changes attempts; the verifier filters

**Contract guidance:** In the matched SCAM 2×2 test, Qwen3.5-4B safety rises from 27.5% direct to 84.8% with contract guidance alone; contracts include SCAM's per-task safety constraints.

**Guidance plus verifier:** In that intervention, Verify-only gives 92.9% and Full 96.2% committed safety (rejections count as safe). Separately, Qwen3.5-4B's 30-task native-scorer run accepts 20% with Verify-only and 70% with Full.

Guidance changes attempts; the gate filters what can pass.

## Valid messages are not completed recipes

**Schema-valid messages:** On heterogeneous CuisineWorld, schema-valid rate is the fraction of orchestrator messages parsing with required fields and types. FormalClaw gains 17–29 percentage points over structured hand-offs and 27–48 percentage points over natural language.

**Dish completion:** That metric is not recipe success: dish completion stayed low in every condition, 5.6% with FormalClaw versus 4.2% with natural language.

Invalid actions still dominated task failures.

## Cross-handoff leaks expose a tier trade-off

| Method | Attack rejection (%) | Benign acceptance (%) | Latency / cost | Encoding size |
| --- | --- | --- | --- | --- |
| T2 local | 0% | n/a | n/a | n/a |
| T3-Adaptive | 100% | 100% | 18.5–309.7 ms | 6.2–181.9 KB |
| **FormalClaw T4-Global** | **100%** | **100%** | **~1.34 s** | **518–1,967 B** |

_AgentLeak, 1–16 hand-offs; T3/T4 match 1,400 paired verdicts. T3 median latency/encoding span depth 1→16; T4 reuses kernel-checked semantics._

## Verification is only as complete as its contract

- **Contracts can miss intent**: A pass certifies the written obligations, not that they capture the user's intent.
- **Traces may be incomplete**: Checks assume traces faithfully record actions; omitted events or hidden side effects can escape verification.
- **Coverage gaps matter**: Task-text-only SCAM contracts missed 13 of 46 constraints (28.3%); 26.9–54.5% of accepted derived-only runs were unsafe.
- **Benign work can be blocked**: On AgentDojo's 97-task benign split, false-block rates were 0.093, 0.082, and 0.072 for Qwen3.5-4B/9B/27B.

Best used when: Use it where obligations and evidence are clear and tool actions can be gated before side effects.

## Key takeaways

- The gain comes from checking explicit obligations at the hand-off rather than trusting a judge to infer them afterward.
- For practitioners, state each obligation and its evidence source; use the lightest check that can verify it before side effects.
- Open question: how can contracts capture user intent completely when both specifications and execution traces can be incomplete?

## Links

- arXiv: https://arxiv.org/abs/2612.00411
- PDF: https://arxiv.org/pdf/2612.00411

## Citation

```bibtex
@article{lou2026formalclaw,
  title   = {FormalClaw: Reliable Agent Communication through Verification-Grounded Protocol},
  author  = {Lou, Hantao and Wu, Xinxiong and Zhou, Jiayi and Yang, Yaodong},
  journal = {arXiv preprint arXiv:2612.00411},
  year    = {2026},
  url     = {https://arxiv.org/abs/2612.00411}
}
```
