acceptodds
Under review as a conference paper at ICLR 2027

FormalClaw: A Verification-Grounded Protocol for Reliable Agentic Communication

Abstract

Large language model agents are increasingly deployed in domains with real-world consequences, where they operate through complex reasoning processes involving tool use, environment interaction, and multi-agent coordination. This expansion creates a reliability concern beyond existing ad hoc intervention or post hoc moderation: How can agentic communication preserve precise specification without demanding end-to-end formalization? In this paper, we introduce FormalClaw, a verification-grounded communication protocol for agents. FormalClaw replaces unstructured instruction with verifier-checkable contracts that encode goals, assumptions, constraints, and evidence obligations. By making contracts and evidence as communication objects, FormalClaw generalizes formal verification from post-hoc oversight to execution-time communication. We instantiate this protocol across single-agent and multi-agent settings, and our experiments show that FormalClaw contracts can improve agent execution relative to natural-language and programmatic feedback while incurring modest verifier-side latency in our evaluations; on ClawArena, FormalClaw achieves up to a 2.16× improvement over natural-language refinement for Qwen3.5-2B. Further experiments demonstrate that FormalClaw improves robustness against vulnerability propagation and benefits iterative refinement.

Primary area:
neurosymbolic & hybrid AI systems (physics-informed, logic & formal reasoning, etc.)
Keywords:
large language model, LLM agents, formal verification

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.00 over 3 reviews, above 27% of the others.
Reviewer_CUWwOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

In this paper, authors propose, FormalClaw, which turns an agent hand-off into a contract containing local obligations and evidence requirements. Each obligation is assigned to a trace check, executable monitor, SMT solver, or proof kernel. Failed checks produce clause-level feedback for another execution attempt. The paper evaluates this interface in human-agent delegation, heterogeneous multi-agent communication, and iterative refinement, with additional safety and verification-tier studies.

Critical strengths
  1. The paper addresses a critical challenge in LLM-based agent systems, which is particularly relevant as agents increasingly perform long-horizon tasks involving tool use and delegation.

  2. The proposed four-tier verification architecture provides a practical compromise between informal natural-language supervision and expensive end-to-end formal verification, making the framework applicable to a broader range of agent tasks.

  3. The paper evaluates the proposed framework in human-agent delegation, heterogeneous multi-agent communication, and iterative agent refinement. The experiments cover multiple model families and sizes and provide evidence of the framework’s general applicability.

Critical weaknesses
  1. The effectiveness of FormalClaw heavily depends on the correctness and completeness of the automatically generated contracts. If the LLM produces incomplete or incorrect specifications, the verifier may accept unreliable outputs. The paper does not sufficiently investigate how specification-generation errors affect overall reliability.

  2. Most experiments are conducted on benchmark environments with relatively well-defined tasks and evaluation criteria. It remain unclear how effectively the framework can handle highly ambiguous, dynamic, or open-ended real-world agent interactions where constructing reliable verification contracts is more challenging.

  3. The ablation studies show relatively modest improvements from the higher verification tiers, and so I am concerned about their necessity and cost-effectiveness.

Questions for authors

Please help answer my concerns in the weakness part. Thank you!

2 comments
AuthorsOpenReview ↗

Response to Reviewer CUWw [1/2]

We thank the reviewer for the constructive review. We ran new experiments on each of the three concerns. (Wi denotes weakness i.)

W1: FormalClaw depends on the correctness and completeness of generated contracts; how do specification errors affect reliability?

We measured this directly in four ways.

1. Contracts without explicit constraints. In the main SCAM runs, contracts include SCAM's per-task safety constraints as T1 obligations, as a user stating their constraints would. We then had GPT-5.4 write each contract from the task text alone (SCAM native scorer, 30 tasks, acc. = acceptance rate):

ExecutorDirectContract-only, derivedFull, derived (acc.)Full, with constraints
Qwen3.5-4B0.2750.624 [0.497, 0.741]0.698 [0.584, 0.806] (0.73)0.927
Qwen3.5-9B0.4960.742 [0.609, 0.860]0.769 [0.662, 0.867] (0.80)0.953
Qwen3.5-27B0.5470.731 [0.599, 0.856]0.746 [0.621, 0.858] (0.73)0.986
Claude Sonnet 4.60.9390.895 [0.818, 0.960]0.929 [0.867, 0.976] (0.87)0.975

Incomplete contracts reduce the benefit but do not remove it: derived-only contracts still improve safety by 20–42 points over Direct, and explicit constraints add a further 18–24.

2. Coverage audit. Of SCAM's 46 per-task constraints, derived-only contracts forbid the same tool call in 7 (15.2%), constrain the tool in 26 (56.5%; for example, as a secret-egress sink or through argument checks), and miss 13 (28.3%). The missed constraints account for the gap in the table above.

3. Under-specified obligations. An incomplete contract shows up as a run the gate accepts but the benchmark scores unsafe:

ExecutorSCAM, with constraintsSCAM, derived-onlyAgentDojo attack
Qwen3.5-4B3/21 (14.3%)12/22 (54.5%)6/78 (7.7%)
Qwen3.5-9B3/29 (10.3%)11/24 (45.8%)4/84 (4.8%)
Qwen3.5-27B1/27 (3.7%)9/22 (40.9%)8/85 (9.4%)
Claude Sonnet 4.64/29 (13.8%)7/26 (26.9%)0/91 (0.0%)

Entries are unsafe/accepted.

4. Over-strict obligations. A wrong or over-strict obligation shows up as a false block. On AgentDojo, with contracts written from the task text, false blocks are 7–9% (9/97, 8/97, 7/97, 7/97 for the four executors).

In short, the verifier faithfully enforces what the contract says, and contract coverage is the dominant source of error. The revision states the guarantee precisely: a passing verdict certifies the encoded obligations over the abstracted trace, not that the contract captures the user's intent. It also lists contract coverage as the main limitation and reports acceptance, false-block, and accepted-but-unsafe rates next to every safety number.

AuthorsOpenReview ↗

Response to Reviewer CUWw [2/2]

W2: How does FormalClaw handle ambiguous, dynamic, or open-ended real-world tasks?

We agree this is the main open problem and list it as the primary limitation. Two new studies move closer to it.

  • ClawEval (300 open-ended tasks graded by an LLM judge) and ClawArena (multi-session, stateful scenarios) were run with no benchmark feedback at all and an equal budget. Contracts written from the task text give a selective retry trigger. It stays within the CI of the best retry baseline while using ~40% fewer attempts (1.7–1.8 vs. 2.3–3.0) and less wall time.
  • On AgentDojo, contracts written by GPT-5.4 from the task text alone lower ASR by 14–48 points for the Qwen executors. They block 7–9% of benign tasks, against 40–47% for Progent.

W3: Higher tiers give modest gains; are they necessary and cost-effective?

Usage. On SCAM the contracts contain 102 T1, 2 T2, 28 T3, and 0 T4 obligations, so most obligations use the cheap tiers by design. Tier assignment is per obligation, and a higher tier is invoked only when a property requires it.

Matched T3 versus T4 on SCAM. Re-checking the same obligations with T4 gives the same verdicts (+0.002 [−0.038, 0.045] for 4B, +0.003 [−0.050, 0.076] for 9B). SCAM's properties are single-agent and finite-trace, so the modest increments in Table 4 are expected there.

Where higher tiers are necessary. Properties that span hand-offs need them; an example is "no secret egress across a delegation chain".

CheckerDetects cross-hand-off egress (depth 1–16)Cost per checkEncoding size
Local check (T2)No (balanced accuracy 0.5 at every depth)——
Fixed-horizon SMTOnly within its horizon——
Adaptive SMT (T3)Yes (1.0)19–310 ms6 → 182 KB
Kernel-checked proof (T4)Yes (1.0)~1.3 s0.5 → 2 KB instances of one reusable theorem

T4 also carries a soundness theorem linking the executable checker to the declarative property. In a mutation test, it rejected all 6 mutated checkers that accepted the attack.

The revision therefore presents the tiers as a cost/assurance menu: T1/T2 by default, T3 for finite-trace data-flow properties, and T4 when a reusable, kernel-checked semantics is worth ~1 s per check.

We hope these responses address the reviewer's concerns and welcome further questions.

Reviewer_U2SuOpenReview ↗
Rating
1
Confidence
2
Informativeness
2
Presentation
2
Soundness
1
Read review
Paper summary

Summary

This paper introduces FormalClaw, a neuro-symbolic, verification-grounded communication protocol designed to prevent specification drift and vulnerability propagation across LLM agent hand-offs. Rather than requiring full end-to-end formalization of open-ended environments, FormalClaw decomposes natural-language instructions into local obligations and verifies them across a four-tier architecture-ranging from execution-trace checks (Tier 1) and structured executable monitors (Tier 2) to SMT certificates (Tier 3) and proof-kernel verification (Tier 4). The authors evaluate this contract-and-evidence handshake across three communication regimes-human-agent delegation, multi-agent coordination, and iterative self-improvement (including inference-time refinement and DPO training)-demonstrating substantial empirical gains in task completion and safety with low verifier latency.

Critical strengths

Strengths

  • The paper addresses an important problem in autonomous agent systems: preventing specification drift and cross-agent vulnerability propagation as workflows scale from single-turn executors to complex multi-agent delegation chains.
  • The obligation-level tiering design and contract-and-evidence handshake provide a unified, practical communication interface across human-agent delegation, heterogeneous multi-agent coordination, and iterative refinement.
  • The empirical evaluation spans a broad suite of open-weight and frontier closed-source models across diverse benchmarks.
Critical weaknesses

Weaknesses

  • Direct contradiction between text and Table 3 results for Verify-only: In Section 3.3.1 (lines 415-416), there is a direct contradiction between the textual interpretation and the numerical results reported in Table 3. The text states that "applying the verifier to the unchanged direct trajectories yields minor safety gain across the four executors." However, Table 3 shows the opposite when moving from Direct to Verify-only: SCAM safety increases from 27.5% to 92.9% (+65.4 percentage points) for Qwen3.5-4B, from 49.6% to 95.8% (+46.2 points) for Qwen3.5-9B, and from 54.7% to 99.2% (+44.5 points) for Qwen3.5-27B. Furthermore, Verify-only outperforms Contract-only (84.8%, 93.6%, 95.5%, and 97.3%) across all four evaluated models, accounting for the vast majority of the improvement over direct generation. Either the Contract-only and Verify-only columns in Table 3 were swapped or miscomputed, or the text intended to compare Verify-only to Full (where adding contract guidance on top of verification yields an incremental +0.8 to +3.3 point gain) while misstating the baseline of comparison. Additionally, the text should explain how Verify-only improves safety on "unchanged direct trajectories" if verification without iterative repair merely rejects unsafe outputs (e.g., whether a verifier rejection is automatically scored as a safe refusal on SCAM).

  • Contradiction Between Critique of Post-Hoc Monitoring and Actual Execution Model: The paper strongly critiques existing post-execution monitors because "errors detected after the fact may already have produced irreversible side effects on the environment" (Section 1 and Appendix A.2). However, FormalClaw's primary mechanism operates in much the same way: Algorithm 1 and Eq. (1) execute the full trajectory τ(k)\tau^{(k)} first and only run verification over the completed trace τ′\tau' and artifact yy. As the authors concede in Section 2.3, "the protocol provides acceptance-time detection and repair rather than rollback of side effects that have already occurred". Because Tiers 1 and 2 inspect completed traces post-execution, any environment side effects within a step have already taken place before the verifier intervenes. The introduction overclaims the distinction between post-execution oversight and acceptance-time verification; the authors should reframe the method as an inter-agent hand-off boundary guard that complements, rather than replaces, pre- and post-execution controls.

  • Inconsistent Model Naming and Unexplained Omission of Gemini: Section 3.1 explicitly lists Gemini 3.1 Pro as part of the core frontier evaluation suite, yet the model is entirely omitted from Table 2 and Figure 3 without explanation. Furthermore, model naming is inconsistent across the manuscript, e.g. GPT-5 vs GPT-5.4, Gemini 3.1 Pro vs Gemini 3 Pro.

  • Ambiguous Retry Budgets, Scorer Leakage, and Frontier Model Regressions: The evaluation setup in Table 2 suffers from critical confounds across budgets, feedback signals, and baseline implementations:

    • Cross-referencing ClawArena scores in Table 2 with Section 3.2.3 reveals that FormalClaw is granted a budget of B=5B=5 refinement attempts, yet the retry budgets for the competing baselines (LLM+NL, LLM+Structured, AgentSpec, Progent, FormalJudge) are never specified.
    • The NL and Python feedback prompts explicitly pipe ground-truth benchmark grader outputs ('benchmark_feedback', 'passed', 'exit_code') directly into the agent's retry context, granting them oracle test-time signals that confound the feedback modality with access to ground truth.
    • What is the reason for external baselines showing severe performance collapse on frontier models (e.g., GPT-5.4 drops ~19-21 percentage points under AgentSpec, Progent, and FormalJudge on SCAM)?
  • Missing Benign Utility:

    • While FormalClaw achieves 0.0% Attack Success Rate (ASR) across 18 of the 25 orchestrator-executor pairs, the authors report only ASR and completely omit benign task completion rates. Because FormalClaw enforces fail-closed rejection, an overly aggressive filter can trivially achieve 0.0% ASR by rejecting legitimate hand-offs. Without benign utility or effective robustness metrics, it is impossible to verify whether the protocol preserves actual agent functionality under attack.
  • Ambiguous Metrics on Cuisine World:

    • The caption of Figure 3 describes performance as "schema-valid communication score," yet the heatmaps are labeled "Accuracy". It remains ambiguous whether this measures actual task/recipe completion or merely whether the executor output parsed into syntactically valid actions.
  • Caption Mismatches in Figure 4:

    • The caption claims each panel compares four configurations ("direct execution, NL feedback, Python feedback, and the stronger available FormalClaw variant"), but the legend displays only three curves, conflating direct execution with the budget-0 intercept.
  • Undefined Safety Metrics, Missing Benign Utility, and Counterintuitive Baseline Drops in Table 5: The adversarial evaluations in Table 5 lack rigorous methodological documentation:

    • Neither Table 5, nor Section 3.4 defines how the reported "safety score" is calculated across ASB, AgentDojo, and InjecAgent (e.g., 1−ASR1 - \text{ASR} vs. task-grounded safety). In 20 out of 24 cells, FormalClaw reports an exact 100.0% safety score. In security benchmarks, 100% defense without accompanying benign utility or false-positive refusal rates is a known indicator of an over-rejection policy that trivially halts execution.
    • In Table 5, adding NL or Structured feedback frequently causes safety to degrade substantially below the unrefined baseline (e.g., Structured drops safety by 4.2 to 12.5 points on AgentDojo across four models, and LLM+NL degrades safety on ASB). The authors do not explain how retry loops are triggered without leaking oracle ground-truth attack labels, nor why multi-turn feedback would actively amplify susceptibility to prompt injection.
    • The unrefined baseline is labeled "LLM" under ASB but "NL" under AgentDojo and InjecAgent, creating unnecessary confusion against the caption's description.
  • Lack of Self-Containment (Related Work Relegated to Appendix): The main manuscript completely omits a Related Work or Background section, relegating it entirely to Appendix.

  • Writing Quality and Redundancies

    • Several sections contain noticeable repetitions. For example, Section 1 lines 090-096 repeats "demands substantial expert effort" and "requires substantial expertise" within three sentences. The contributions list in Section 1 also repeats the three target regimes verbatim across consecutive bullet points.
    • Variable notation in Section 2.1 is imprecise: JθJ_\theta and satisfaction outcomes v^,v∗\hat{v}, v^* are introduced informally without proper mathematical scaffolding, functioning more as decorative notation than rigorous formalization.
Questions for authors

Can we have clarification on the weakness ?

3 comments
AuthorsOpenReview ↗

Response to Reviewer U2Su [1/3]

We thank the reviewer for the detailed reading. We address each weakness in the order of the review and ran new experiments where a weakness concerns the evidence. (Wi denotes the i-th weakness.)

W1: The text on Verify-only contradicts Table 3; is a rejection scored as safe?

The numbers in Table 3 are correct; the sentence "minor safety gain" mis-describes the Verify-only column and is rewritten. To the question: yes, in the Table 3 replay a candidate rejected by the gate commits no unsafe action and is counted as safe. Table 3 measures committed safety, and Verify-only improves it by filtering, not by repairing trajectories. The revised text distinguishes the three conditions: Contract-only changes what the executor attempts, Verify-only accepts or rejects existing candidates, and Full combines both.

To show what the full method does beyond filtering, we re-ran SCAM live under SCAM's own scorer and report acceptance rates (acc.):

ExecutorDirectContract-only (no gate)Verify-only (acc.)Full (acc.)
Qwen3.5-4B0.2750.8480.663 (0.20)0.927 (0.70)
Qwen3.5-9B0.4960.9360.740 (0.27)0.953 (0.97)
Qwen3.5-27B0.5470.9550.843 (0.40)0.986 (0.90)
Claude Sonnet 4.60.9390.9730.971 (0.93)0.975 (0.97)

This confirms the reviewer's reading that Verify-only mostly filters. It also shows that the full method does not: Contract-only never rejects, yet it raises 4B from 0.275 to 0.848, and Full reaches 0.93–0.99 while accepting 70–97% of tasks.

W2: The critique of post-hoc monitoring contradicts the execution model.

The gates in our experiments (SCAM, AgentDojo, ClawEval, ClawArena) are precommit. Each proposed tool call is checked against the precommit obligations on a copy of the environment, and only accepted calls reach the real environment, so a blocked call has no side effect. Only response-level obligations, such as "do not reveal the secret in the reply", are checked after output. Algorithm 1 and Eq. (1) showed a simplified trace-level view and are rewritten to show both phases. We agree with the suggested framing and adopt it: FormalClaw is a guard at the hand-off boundary that complements pre-execution policies and post-hoc monitors, and the introduction is revised accordingly.

W3: Gemini and model naming.

Gemini 3.1 Pro is evaluated only in the robustness study (Table 5). Section 3.1 wrongly listed it in the main suite, which is why it does not appear in Table 2 or Figure 3, and Section 3.1 now states its scope. The frontier executor is GPT-5, and GPT-5.4 is used only as the contract formalizer. All model names are standardized in the text, Table 2, Table 5, and Appendix C.2.

AuthorsOpenReview ↗

Response to Reviewer U2Su [2/3]

W4: Retry budgets, scorer feedback, and frontier-model baselines.

Budgets. In Table 2, all refinement methods (LLM+NL, LLM+Structured, FormalClaw) have the same refinement budget of 5, matching Figure 4. AgentSpec, Progent, and FormalJudge are execution-time enforcement baselines and run a single pass without refinement. The revision adds a configuration table with the maximum and mean attempts, feedback source, and stopping rule for every method.

Scorer feedback. In the ClawArena comparison, ClawArena's native per-round feedback is given identically to every refinement arm, FormalClaw included. The baselines therefore have no access advantage, and the comparison isolates how each feedback modality uses the same signal.

The reviewer's concern about deployment without such a signal is fair, so we added an equal-budget, oracle-free study. Every arm has B = 3 total attempts, the scorer is used only for final evaluation, and each arm decides on its own when to retry. Self-refine always retries unless the model declares itself done. The NL critic is the same model judging its own answer. FormalClaw retries only when its verifier rejects.

BenchmarkExecutorDirectSelf-refineNL criticFormalClawAttempts (SR / critic / FC)
ClawArena TCR (337 rounds)Qwen3.5-4B0.5340.5850.5430.5642.94 / 2.87 / 1.70
Qwen3.5-9B0.5580.6230.5700.5762.91 / 2.72 / 1.77
ClawEval (300 tasks)Qwen3.5-4B0.4550.3850.4230.4473.00 / 2.56 / 1.80
Qwen3.5-9B0.4480.4280.4520.4463.00 / 2.33 / 1.81

FormalClaw stays within the CI of the best retry method on both benchmarks, is never the worst arm, and uses about 40% fewer attempts. Indiscriminate retrying can hurt: on ClawEval, self-refine significantly lowers 4B's score.

Frontier baselines on SCAM. The drop reflects how SCAM scores interrupted runs. A strong executor such as GPT-5 often recognizes the threat itself and refuses explicitly, which SCAM scores as fully safe (a fixed refusal naming the threat scores 1.000). The rule-based baselines intervene before that happens: they block the tool call, and the run ends without the executor's refusal. SCAM scores such a silent block much lower: a policy that blocks every tool call scores 0.570.

On a weaker executor, blocking replaces unsafe actions and raises the score. On a frontier executor, it often replaces a correct refusal and lowers it. FormalJudge is further affected by fail-closed compilation errors in its generated Dafny specifications, which reject the run outright. FormalClaw avoids this failure mode because the contract is shown to the executor, which can then refuse on its own, so the gate rarely has to intervene (acceptance 0.97 for Sonnet).

W5: Missing benign utility.

We agree that ASR alone cannot distinguish defense from over-rejection. We ran AgentDojo with 97 user tasks, benign and attacked, for four executors and the official AgentSpec and Progent:

ExecutorMethodASR ↓Benign utilitySafe-and-completeFalse-block
Qwen3.5-4BDirect / FormalClaw / AgentSpec / Progent0.216 / 0.072 / 0.134 / 0.0930.856 / 0.804 / 0.814 / 0.5460.639 / 0.660 / 0.670 / 0.5360 / 0.093 / 0.093 / 0.412
Qwen3.5-9Bsame order0.227 / 0.072 / 0.093 / 0.0820.907 / 0.856 / 0.825 / 0.5460.649 / 0.701 / 0.722 / 0.5360 / 0.082 / 0.093 / 0.454
Qwen3.5-27Bsame order0.588 / 0.113 / 0.196 / 0.0310.897 / 0.876 / 0.804 / 0.5570.309 / 0.691 / 0.577 / 0.5460 / 0.072 / 0.093 / 0.474
Claude Sonnet 4.6same order0 / 0 / 0 / 00.918 / 0.835 / 0.825 / 0.5570.845 / 0.794 / 0.794 / 0.5570 / 0.072 / 0.082 / 0.402

FormalClaw blocks 7–9% of benign tasks, with a utility change that is not significant for the Qwen executors (McNemar p ≥ 0.30). Progent blocks 40–47%, and its benign utility falls to ≈0.55 for every model. That is the over-rejection signature the reviewer describes, and FormalClaw does not show it.

AuthorsOpenReview ↗

Response to Reviewer U2Su [3/3]

W6: CuisineWorld metric (Figure 3).

Figure 3 reports the schema-valid message rate, not recipe completion. Every orchestrator message (one per environment step) is checked against the condition's message schema, and the score is the fraction that pass: the message must parse, contain the required fields, and give each field the required type. The "Accuracy" label on the heatmaps was wrong and is replaced with this metric name. We also report dish completion separately. In CuisineWorld it is low for every condition (2 dishes, at most 60 steps each), with FormalClaw at 5.6% versus 4.2% for NL, and invalid actions dominate the failures, as stated in Section 3.2. The appendix gives both definitions.

W7: Figure 4 caption.

Fixed: Direct is the budget-0 intercept of each curve, not a separate curve.

W8: Table 5 metrics and baseline drops.

Definition. The caption now defines the safety score as 1 − ASR: the fraction of attacked cases in which the injection does not achieve its target malicious action, judged by each benchmark's official attack checker.

Labels and utility. The unrefined baseline is labeled consistently. The AgentDojo study in [2/3] adds utility and false-block rates next to safety.

Why feedback can lower safety. Each NL or structured retry re-runs the task and re-reads the tool outputs that carry the injection, so every additional attempt is another chance for the attack to succeed. FormalClaw's feedback names the violated obligations, and its precommit gate blocks the injected action before it executes, so retries do not add exposure in the same way.

W9: Related Work in the appendix.

A condensed Related Work section moves into the main paper.

W10: Writing and notation.

We removed the repetitions the reviewer identified in Section 1 and in the contribution list. Section 2.1 now defines contracts, obligations, evidence, and verdicts with types and states the acceptance condition as an equation. It also states the verifier's assumptions (a trusted trace abstraction and a correct contract) and what a passing verdict guarantees.

Ethics flag. We address this in a separate note.

We hope these responses address the reviewer's concerns and welcome further questions.

Reviewer_8kx2OpenReview ↗
Rating
3
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes FormalClaw, a verification-grounded communication protocol for reliable LLM agents. It replaces unstructured agent hand-offs with explicit contracts containing task requirements and evidence obligations. A four-tier verification framework checks these obligations using execution traces (T1), structured executable checks (T2), SMT solving (T3), or kernel-checked proofs (T4). Failed obligations provide targeted feedback for iterative refinement. The method is evaluated across human–agent delegation, multi-agent coordination, and agent self-improvement, demonstrating substantial improvements in task performance and safety, particularly for smaller models.

Critical strengths

S1. Practical and relevant problem formulation. The paper addresses specification drift in agent communication. Obligation-level verification provides a pragmatic alternative to expensive end-to-end formalization, with a unified contract-and-evidence protocol applicable across different agent workflows.

S2. Broad experimental evaluation. The experiments cover multiple benchmarks, heterogeneous agent configurations, and models of varying capabilities. Comparisons with AgentSpec, Progent, FormalJudge, and natural-language/structured feedback provide useful empirical context. The heterogeneous coordination and AgentLeak experiments are particularly informative.

S3. Promising effectiveness and interpretable feedback. FormalClaw substantially improves weaker models, such as Qwen3.5-9B on ClawArena (44.02% to 82.08%). Clause-level diagnostics support targeted refinement, while the reported verifier-side latency is relatively small compared with task execution time.

Critical weaknesses

W1. Safety improvements are not clearly distinguished from rejection and task completion. In Table 3, the verify-only setting improves Qwen3.5-4B safety from 27.5% to 92.9% without modifying the original trajectories. This raises concerns about whether rejected executions are counted as safe rather than successfully repaired. Algorithm 1 also leaves the outcome after exhausting the refinement budget unspecified. The paper does not report rejection rates, successful repair rates, or benign-task completion alongside safety on adversarial benchmarks. Consequently, the near-100% safety results may partly reflect blocking or over-refusal rather than improved reliable execution.

W2. The independent contribution and reliability of formal verification remain unclear. Contracts, structured checkers, and trace abstractions are LLM-generated (Appendix E), yet their correctness and completeness are not evaluated. In Table 3, contract-only guidance already improves safety from 27.5% to 84.8%. Table 4 shows that T1 alone achieves 89.6% mean safety, compared with 92.6% using all four tiers. The paper does not report T3/T4 invocation frequencies or their independent contributions on the main benchmarks. Beyond the controlled AgentLeak study, it remains unclear whether the improvements primarily result from formal verification or structured prompting and LLM-based checking.

W3. Experimental rigor, consistency, and end-to-end efficiency require further investigation. The evaluation lacks variance estimates or confidence intervals, while SCAM and ClawEval use only 100 cases each. Similar conditions yield different results across Tables 2–4 without clearly explaining whether the evaluation subsets differ. Although verifier latency is reported, the end-to-end overhead of contract generation, additional LLM calls, and repeated execution is not sufficiently characterized. Moreover, FormalClaw underperforms some baselines on ClawArena with Qwen3.5-4B, and the DPO improvements are not consistent across model sizes. These limitations weaken the generality and practical efficiency claims.

Questions for authors

How can the authors distinguish genuine safety improvements from rejected executions? Specifically, how are verify-only rejections and refinement-budget-exhausted trajectories scored, and can the authors report rejection rates, successful repair rates, and benign-task completion alongside safety scores?

2 comments
AuthorsOpenReview ↗

Response to Reviewer 8kx2 [1/2]

We thank the reviewer for the positive assessment and for the precise question on rejection versus repair. We ran new experiments to answer it and report the results below. (Wi denotes weakness i; Q denotes the question.)

Q / W1: How are Verify-only rejections and budget-exhausted runs scored? Can you report rejection rates, repair rates, and benign-task completion alongside safety?

Scoring. In the Table 3 replay, a candidate blocked by the gate commits no unsafe action and is counted as safe. When the refinement budget is exhausted, the last attempt is returned and marked final_accepted = false. Infrastructure failures are retried and never scored. The revision states this in Algorithm 1 and Section 3.3.1.

Rejection rates. We re-ran SCAM live and scored every run with SCAM's own scorer, which has no blocked-is-safe convention. Acc. is the fraction of tasks whose run the gate accepted (95% bootstrap CIs, 10,000 resamples).

ExecutorDirectContract-only (no gate)Verify-only (acc.)Full (acc.)
Qwen3.5-4B0.275 [0.169, 0.395]0.848 [0.746, 0.935]0.663 (0.20)0.927 [0.846, 0.986] (0.70)
Qwen3.5-9B0.496 [0.351, 0.644]0.936 [0.858, 0.989]0.740 (0.27)0.953 [0.878, 1.000] (0.97)
Qwen3.5-27B0.547 [0.395, 0.693]0.955 [0.896, 0.994]0.843 (0.40)0.986 [0.964, 1.000] (0.90)
Claude Sonnet 4.60.939 [0.872, 0.990]0.973 [0.946, 0.994]0.971 (0.93)0.975 [0.950, 0.994] (0.97)

Reference policies under the same scorer: blocking every tool call scores 0.570, and a fixed refusal naming the threat scores 1.000.

The reviewer is right that Verify-only on its own mostly filters (acceptance 0.20–0.40 for Qwen). The full method does not. Contract-only, which never rejects anything, already raises 4B from 0.275 to 0.848, because the executor plans differently once it sees the obligations. Full then reaches 0.93–0.99 while accepting 70–97% of tasks.

Benign-task completion. SCAM has no completion checkpoint, so we ran AgentDojo (97 user tasks, benign and important_instructions splits; contracts written by GPT-5.4 from the task text; official AgentSpec and Progent).

ExecutorMethodASR ↓Benign utilitySafe-and-complete under attackFalse-block
Qwen3.5-4BDirect0.2160.8560.6390
FormalClaw0.0720.8040.6600.093
AgentSpec0.1340.8140.6700.093
Progent0.0930.5460.5360.412
Qwen3.5-9BDirect0.2270.9070.6490
FormalClaw0.0720.8560.7010.082
AgentSpec0.0930.8250.7220.093
Progent0.0820.5460.5360.454
Qwen3.5-27BDirect0.5880.8970.3090
FormalClaw0.1130.8760.6910.072
AgentSpec0.1960.8040.5770.093
Progent0.0310.5570.5460.474

FormalClaw lowers ASR by 14–48 points. Benign utility changes by 2–5 points, which is not significant (exact McNemar p = 0.30, 0.30, 0.79), and 7–9% of benign tasks are blocked. Progent blocks 41–47%. For 27B, safe-and-complete under attack more than doubles (0.309 → 0.691, +40/−3 tasks, p = 3e−9).

Repair rate. With identical frozen first attempts and the same budget, verifier feedback repaired 0% / 0% / 7.7% of failing SCAM runs for 4B / 9B / 27B (n = 16 / 12 / 13). On SCAM, then, the gain comes from contract guidance and the gate, not from repair, and the revision says so.

AuthorsOpenReview ↗

Response to Reviewer 8kx2 [2/2]

W2: Is the gain from formal verification or from structured prompting? Are LLM-generated contracts reliable? How often are T3/T4 used?

Guidance versus enforcement. The table in [1/2] separates the two. Contract guidance gives most of the gain, and the gate adds 1–8 points over Contract-only for the Qwen models at a reported acceptance cost. Both belong to the protocol: the contract is what the executor follows and what the verifier checks.

Contract reliability. We audited the contracts automatically in three ways.

  • Coverage. In the main SCAM runs, contracts include SCAM's per-task safety constraints (its no_dangerous_tool_call checkpoints) as T1 obligations, as a user stating their constraints would. We then had GPT-5.4 write contracts from the task text alone. Of the 46 constraints, these derived contracts forbid the same tool call in 7 (15.2%), constrain it in 26 (56.5%; for example, the tool becomes a secret-egress sink or its arguments are checked), and miss 13 (28.3%).
  • Effect on safety. With derived-only contracts, Full SCAM safety is 0.698 / 0.769 / 0.746 for 4B / 9B / 27B. That is 20–42 points above Direct, and 18–24 points below Full with explicit constraints.
  • Over-strict and under-specified obligations. Over-strict obligations show up as false blocks, which are 7–9% on AgentDojo. Under-specified obligations show up as runs the gate accepts but the benchmark scores unsafe: 0–9.4% of accepted AgentDojo attack runs, 3.7–14.3% of accepted SCAM runs with explicit constraints, and 27–55% with derived-only contracts.

Contract coverage, not the verifier, is therefore the dominant source of error, and the revision states this as the main limitation.

Tier usage on SCAM. The GPT-5.4 contracts contain 132 obligations: 102 T1, 2 T2, 28 T3, and 0 T4. Re-checking the T3 obligations with T4 gives the same verdicts (Δ safety +0.002 [−0.038, 0.045] for 4B, +0.003 [−0.050, 0.076] for 9B). SCAM's properties are single-agent and finite-trace, so T1–T3 suffice there.

Where T3/T4 matter. In the controlled cross-hand-off study, local checks (T2) cannot detect secret egress at any depth (balanced accuracy 0.5), and fixed-horizon SMT loses coverage beyond its horizon. Adaptive SMT and T4 both reach 1.0 at depths 1–16. T4 costs ~1.3 s per check versus 19–310 ms for adaptive SMT. In exchange, it uses one reusable kernel-checked theorem whose instances grow from 0.5 to 2 KB, while the SMT formula grows from 6 KB to 182 KB.

W3: Variance, consistency across tables, end-to-end cost, 4B on ClawArena, DPO.

Variance. All new results carry task-level bootstrap CIs (ClawArena resampled by test, not by round). Seed variance at temperature 0.7 over 3 seeds: Direct 0.320 ± 0.051 (4B) and 0.462 ± 0.014 (9B); Contract-only 0.805 ± 0.057 and 0.923 ± 0.016.

Consistency across Tables 2–4. The three tables come from separate experiment rounds and measure different things: Table 2 is the main comparison with baselines, Table 3 decomposes FormalClaw into its components, and Table 4 ablates the verification tiers. Their configurations differ, so the same condition need not give identical numbers. The revision states N, the task subset, the budget, and the aggregation under each table.

End-to-end cost. We compared retry methods with equal budget (B = 3 total attempts) and no benchmark feedback. The scorer is used only for final evaluation.

DirectSelf-refineNL criticFormalClaw
ClawArena TCR, 4B0.5340.5850.5430.564
ClawArena TCR, 9B0.5580.6230.5700.576
ClawEval score, 4B0.4550.3850.4230.447
ClawEval score, 9B0.4480.4280.4520.446
Attempts used12.9–3.02.3–2.91.7–1.8
ClawEval E2E p50, 4B / 9B (s)68 / 103177 / 287205 / 275111 / 181
ClawEval executor input tokens, 4B (k)169460426322

FormalClaw stays within the CI of the best retry method on both benchmarks. It uses ~40% fewer attempts and has the lowest wall time among retry methods on ClawEval. Verification takes 3.5–3.7 s per ClawEval task, and one-time formalization costs ≈1.6k GPT-5.4 tokens per task.

4B on ClawArena. In this oracle-free comparison, all 4B arms are within each other's CIs, and FormalClaw gets there with the fewest attempts.

DPO. The size of the DPO gain depends on how much headroom the base model leaves: smaller models gain the most, while larger models are closer to saturation on these tasks. DPO is a supplementary result showing that verifier verdicts can also serve as a training signal. We will report variance over multiple seeds in the final version.

We hope these responses address the reviewer's concerns and welcome further questions.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.