Safety & Control
~8 min readUpdated: December 2026

PandaProbe: Agents That Learn From Mistakes via Validated Rule Revisions

PandaProbe Self-Revising Agent Rules and Independent Validation Loop

PandaProbe (arXiv:2612.05227) is an open-source tracing, evaluation, and reflection platform where agents inspect failed execution traces and propose edits to `/rules/**/*.md`, but cannot self-approve them. Validated across 16 paired runs on tau2-bench and Terminal-Bench, PandaProbe improved mean scores in every pairing and nearly tripled Kimi K2.5 pass^4 on retail (7.9% to 21.1%).

Technical Review: Smoke Monkey Core Architecture Team
Tested on Node.js 18+ & BunTypeScript 5.x
Quick Answer & Executive Definition

PandaProbe: Agents That Learn From Mistakes via Validated Rule Revisions: PandaProbe (arXiv:2612.05227) is an open-source tracing, evaluation, and reflection platform where agents inspect failed execution traces and propose edits to `/rules/**/*.md`, but cannot self-approve them. Validated across 16 paired runs on tau2-bench and Terminal-Bench, PandaProbe improved mean scores in every pairing and nearly tripled Kimi K2.5 pass^4 on retail (7.9% to 21.1%). Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.

Key Architectural Takeaways
Quick Implementation Examplepandaprobe-rule-governed-agent.ts
pandaprobe-rule-governed-agent.tstypescript
import { createAgent } from '@smoke-monkey/harness';
// Enforce read-only inbox evidence & gated rule promotion in Smoke Monkey Harness
const agent = createAgent({
agentId: 'pandaprobe-rule-reflection-agent',
provider: 'openai-compatible',
baseUrl: 'http://127.0.0.1:8000/v1',
model: 'moonshotai/Kimi-K2.5',
workspacePath: process.cwd(),
permissions: {
read_file: 'allow',
write_file: 'ask', // Require external gate before promoting /rules/**/*.md
run_command: 'ask',
},
});
async function main() {
const result = await agent.run(
'Read /inbox/notice.json and /inbox/evidence.txt, propose a concise rule patch in /rules/retry-guard.md, and halt for validation.'
);
console.log('Proposed Rule Revision:', result.summary);
}
main().catch(console.error);
Video Guides

Watch: Related Video Guides

Build Self-Improving Agents: LangMem Procedural Memory Tutorial

How To Build Self-Improving AI Agents (Full Walkthrough)

How PandaProbe Prevents Bad Rules From Poisoning Future Sessions

PandaProbe (arXiv:2612.05227) is an open-source agent reliability framework that turns execution failures into versioned operating rules without model weight updates. When an evaluation detects a task completion or coherence failure (default threshold $\tau_j = 0.5$), the SDK mounts a sandboxed virtual filesystem containing read-only trace evidence (/inbox/notice.json, /inbox/evidence.txt) and writable rule files (/rules/**/*.md, max 8 KiB each, up to 256 files / 512 KiB).

Critically, the agent cannot approve its own rule edits. Proposed rule patches must clear an independent validation gate—either paired replay against at least 3 distinct historical cases requiring mean improvement $\eta \ge 0.05$ with regression tolerance $\epsilon \le 0.02$, or forward validation monitoring subsequent session flags. Across 4 open-weight models and 4 trials per task:

Benchmark & ModelBaseline Mean ScorePandaProbe Mean ScoreBaseline pass^4PandaProbe pass^4
tau2 airline — GPT-OSS 20B0.61000.637520.00%32.00%
tau2 airline — Kimi K2.50.66500.675022.00%24.00%
tau2 airline — Qwen3 32B0.50750.53752.00%6.00%
tau2 retail — GPT-OSS 20B0.50110.54617.02%7.89%
tau2 retail — Kimi K2.50.62390.66017.89%21.05%
tau2 retail — Nemotron 120B0.65570.665714.04%14.91%
Terminal-Bench (10) — GPT-OSS 20B0.23600.3148 (+33.4%)——

Operating Budgets, Latency Overhead, and Virtual Reflection Workspace

Reliability gains carry a measurable compute cost: PandaProbe reported 2.81x baseline model spend and a 7.22x median trial latency increase due to reflection checkpoints (60 s deadline, up to 8 shell calls, 12 KiB/call output cap) and validation replays (120 s replay timeout). To bound runtime cost in production, trigger reflection only on high-severity failures and enforce the 60-second cooldown between duplicate failure notices.

bash
# Scaffold a PandaProbe-style rule validation harness check in CI
mkdir -p .pandaprobe/rules .pandaprobe/inbox .pandaprobe/decisions
cat << 'EOF' > .pandaprobe/validate_rule.py
BASELINE_SCORES = [0.40, 0.45, 0.50]
CANDIDATE_SCORES = [0.55, 0.50, 0.60]
mean_gain = sum(c - b for c, b in zip(CANDIDATE_SCORES, BASELINE_SCORES)) / len(BASELINE_SCORES)
max_drop = max(0.0, *(b - c for c, b in zip(CANDIDATE_SCORES, BASELINE_SCORES)))
assert len(BASELINE_SCORES) >= 3 and mean_gain >= 0.05 and max_drop <= 0.02, "Rule rejected"
print(f"Rule APPROVED: mean_gain={mean_gain:.3f}, max_drop={max_drop:.3f}")
EOF
python3 .pandaprobe/validate_rule.py

Never Allow Self-Approved Prompt or Rule Edits

Unvalidated agent self-edits cause prompt bloat and silent regressions on edge cases. Always require >=3 paired validation cases and an explicit regression floor (<=0.02) before publishing rules.

Google Search Questions & Answers

Frequently Asked Questions

Q:How does PandaProbe differ from standard Reflexion or prompt memory?

PandaProbe separates rule authoring from rule approval: the agent writes candidate patches to /rules/**/*.md after inspecting trace evidence, and an independent validator must verify improvement across paired or forward runs before publishing.

Q:What are the default validation thresholds in PandaProbe?

The paper specifies at least 3 distinct paired validation cases, a minimum mean improvement eta of 0.05, a regression tolerance epsilon of 0.02, an 8 KiB rule-file cap, and a 120-second replay deadline.

Q:What is the compute and latency overhead of PandaProbe?

Across the evaluated benchmarks, PandaProbe averaged 2.81x the baseline model spend and a 7.22x median increase in time per trial due to reflection checkpoints and validation.

Q:Which models showed the largest gains with PandaProbe?

Kimi K2.5 pass^4 on tau2-bench retail jumped from 7.89% to 21.05%, GPT-OSS 20B pass^4 on airline rose from 20.0% to 32.0%, and GPT-OSS 20B mean score on Terminal-Bench increased 33.4% relative (0.2360 to 0.3148).

Related Alternatives & Comparisons

Related Architecture Guides

View all guides

Build with Smoke Monkey Harness

Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.

npm install smoke-monkey-harness