fix(consult): treat pinched answers as failed and restore reply actions

Incomplete Flash generations were billed as completed consultations. Fail
those runs, keep the partial text, and reuse the rectification like/copy/rerun
bar on ordinary chat replies.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-19 19:40:50 +08:00
co-authored by Cursor
parent c38f11dbd3
commit 7d667fecbf
17 changed files with 487 additions and 89 deletions
@@ -145,6 +145,10 @@ test("error normalization never records arbitrary exception messages", () => {
toAgentObservabilityErrorCode(new Error("runtime_contract_incomplete")),
"runtime_contract_incomplete",
);
assert.equal(
toAgentObservabilityErrorCode(new Error("answer_truncated")),
"answer_truncated",
);
assert.equal(
toAgentObservabilityErrorCode(new Error("/opt/internal/users/alice.json")),
"calculation_failed",