sync(v2.12): Context Doctor split-thoughts repair and fallback response handling #138

Open
opened 2026-09-09 14:58:55 +00:00 by nsaspy · 0 comments
Owner

Upstream

Agent Zero v2.12: https://github.com/agent0ai/agent-zero/releases/tag/v2.12

Gap

The v2.12 split-thoughts repair strategy and its revised reasoning/plain-text fallback accounting are not present on main (thoughts_fallback is absent in code search).

Required work

  • Add the split-thoughts repair strategy with configurable selection and a small helper for repair-value selection.
  • Handle reasoning-only Responses output with a dedicated retry warning/user notice.
  • Handle plain-text fallback output with dedicated classification and retry/user notice behavior.
  • Require at least one recognized A0 response key with a non-empty value for a response to count as usable.
  • Move raw-text wrapping after repair-strategy selection so it cannot mask a better classification.
  • Count thoughts_fallback toward the unusable-response ceiling.
  • Let Responses text reach the core dispatcher while still repairing recognizable tool intent.
  • Preserve the v2.12 breaking behavior: do not auto-populate thoughts from reasoning when thoughts is absent.

Acceptance

  • Reasoning-only, plain-text, malformed A0 envelopes, and recognizable text tool intent each take the intended path.
  • Fallback warnings contribute to retry/unusable limits deterministically.
  • Canonical native function calls are never rewritten by these repair strategies.
  • Tests cover all repair strategies, empty-value envelopes, warning limits, reasoning-without-thoughts, and final user notices.
## Upstream Agent Zero v2.12: https://github.com/agent0ai/agent-zero/releases/tag/v2.12 ## Gap The v2.12 `split-thoughts` repair strategy and its revised reasoning/plain-text fallback accounting are not present on `main` (`thoughts_fallback` is absent in code search). ## Required work - Add the split-thoughts repair strategy with configurable selection and a small helper for repair-value selection. - Handle reasoning-only Responses output with a dedicated retry warning/user notice. - Handle plain-text fallback output with dedicated classification and retry/user notice behavior. - Require at least one recognized A0 response key with a non-empty value for a response to count as usable. - Move raw-text wrapping after repair-strategy selection so it cannot mask a better classification. - Count `thoughts_fallback` toward the unusable-response ceiling. - Let Responses text reach the core dispatcher while still repairing recognizable tool intent. - Preserve the v2.12 breaking behavior: do not auto-populate `thoughts` from `reasoning` when `thoughts` is absent. ## Acceptance - Reasoning-only, plain-text, malformed A0 envelopes, and recognizable text tool intent each take the intended path. - Fallback warnings contribute to retry/unusable limits deterministically. - Canonical native function calls are never rewritten by these repair strategies. - Tests cover all repair strategies, empty-value envelopes, warning limits, reasoning-without-thoughts, and final user notices.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/a0-symbolics#138
No description provided.