refactor(server): share Claude result status and error mapping - #10296
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, self-contained refactor that unifies existing Claude result status and error mapping without changing the established outcomes. The added tests cover forward compatibility with unknown terminal reasons, and no product defaults or static-analysis suppressions are affected. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
329fb04 to
489846c
Compare
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
## What's Changed * feat(usage): pool subscription limits per provider across accounts and environments by @juliusmarminge in pingdotgg/t3code#10300 * chore(web): remove usage limits demo fixtures by @juliusmarminge in pingdotgg/t3code#10330 * fix(web): expose error disclosure state by @saphid in pingdotgg/t3code#10125 * fix(web): name the editor picker accurately by @saphid in pingdotgg/t3code#10124 * fix(web): make task row states readable by @saphid in pingdotgg/t3code#10128 * fix(web): explain hosted connection prerequisites by @saphid in pingdotgg/t3code#10129 * fix(web): name combobox chip removal targets by @saphid in pingdotgg/t3code#10127 * fix(marketing): present the Git workflow as an illustration by @saphid in pingdotgg/t3code#10130 * feat(mobile): pool usage limits across selected environments by @juliusmarminge in pingdotgg/t3code#10334 * fix(release): space automatic nightlies at least six hours apart by @t3dotgg in pingdotgg/t3code#10272 * refactor(web): share bulk thread deletion between sidebars by @t3dotgg in pingdotgg/t3code#10106 * refactor(client): share tool outcome rules by @t3dotgg in pingdotgg/t3code#10122 * refactor(server): share Claude result status and error mapping by @t3dotgg in pingdotgg/t3code#10296 * fix(server): settle inactive threads without a PR lookup by @t3dotgg in pingdotgg/t3code#10103 * fix(ssh): report remote stop failures without losing ownership by @t3dotgg in pingdotgg/t3code#10105 * perf(server): stop scanning old OpenCode parts by @t3dotgg in pingdotgg/t3code#10116 * perf(server): avoid full thread reads on turn start by @t3dotgg in pingdotgg/t3code#10108 * perf(web): skip checkpoint map rebuilds while streaming by @t3dotgg in pingdotgg/t3code#10118 * perf(server): skip plan bodies in thread summaries by @t3dotgg in pingdotgg/t3code#10341 * fix(server): skip disabled provider instances for text generation fallback by @t3dotgg in pingdotgg/t3code#10346 * fix(server): capture checkpoints before refreshing PR status by @t3dotgg in pingdotgg/t3code#10347 * fix(web): keep manual panel choices during a turn by @t3dotgg in pingdotgg/t3code#10113 * fix(threads): keep completed requests closed across clients by @t3dotgg in pingdotgg/t3code#10123 * perf(server): finish runtime messages without full thread reads by @t3dotgg in pingdotgg/t3code#10120 * refactor(server): let adapters declare context compaction by @t3dotgg in pingdotgg/t3code#10112 * fix(server): link thread PRs without an open client by @t3dotgg in pingdotgg/t3code#10101 **Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260906.1293...v0.0.39-nightly.20260906.1303 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260906.1303
Thread the failure hint through resultOutcome, which main introduced in pingdotgg#10296, instead of the removed resultUserFacingError/turnStatusFromResult pair. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude turn status and error text use separate lists of terminal failure reasons. A new reason can update one list and leave the other wrong.
Use one result mapper for both values. Keep existing error priority, success-tagged failures, overloads, interruption, cancellation, and unknown CLI reasons.
All 95 Claude adapter tests passed, including two new unknown-reason cases. Server typecheck and scoped lint passed. Independent source review found no behavior changes.
Created in Codex.
Note
Unify Claude result status and error mapping in
resultOutcomeresultOutcomehelper in ClaudeAdapter.ts that derives turn status and error text togetherFAILED_TERMINAL_REASONSconstant; its reason list now lives in theterminalResultErrorswitchhandleResultMessagenow routes all result outcomes throughresultOutcome; any terminal reason not in theterminalResultErrorswitch will no longer be treated as a failure on success-tagged resultsMacroscope summarized 489846c.