Replay tool calls natively and tighten the deliverable gate #42

Merged
weichen merged 1 commits from feature/agent-harness-p0 into main 2026-10-01 12:43:27 +00:00
1 Commits
Author SHA1 Message Date
weichenandCursor 188c63357c Replay tool calls natively and tighten the deliverable gate
Why: Flattened "[调用工具 …]" history taught the model to imitate calls and invent artifact ids. A single regex correction then accepted the second false claim.
Evidence: ctxasm replay tests cover native tool messages, missing-result pairing, argument compaction, demoted text, and forged-marker stripping. Runtime tests cover forged markers, extension-less claims, two corrections, and the fallback notice.
Impact: Assistant history sent to the model no longer contains flattened tool calls. The direct runner corrects a false deliverable twice, then appends a notice instead of accepting the claim. The squad entry still fails closed on the same predicate. base.deliverables is now v5.
Refs: feature/agent-harness-p0
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 12:29:38 +00:00