agent-zero/plugins/_context_doctor
linkliti 0bd5f34848 Handle reasoning-only and plain-text fallback responses
Reasoning-only turns now retry with an agent-facing fw.msg_reasoning_only.md history warning and a separate fw.msg_reasoning_only_response.md user notice, counted by the stop-unusable-response-loop extension instead of falling through to the unclear misformat path. Context Doctor detects raw-text fallback conversions and claims the turn with fw.msg_thoughts_fallback.md agent warning and fw.msg_thoughts_fallback_response.md user notice, also counted by the stop loop. Both cases set skip_default_processing so the model gets a clear retry instruction.
2026-09-03 03:37:59 +03:00
..
extensions/python Handle reasoning-only and plain-text fallback responses 2026-09-03 03:37:59 +03:00
helpers Handle reasoning-only and plain-text fallback responses 2026-09-03 03:37:59 +03:00
prompts Handle reasoning-only and plain-text fallback responses 2026-09-03 03:37:59 +03:00
tests Handle reasoning-only and plain-text fallback responses 2026-09-03 03:37:59 +03:00
webui Add Context Doctor plugin 2026-08-24 19:51:30 +03:00
AGENTS.md Handle reasoning-only and plain-text fallback responses 2026-09-03 03:37:59 +03:00
default_config.yaml Add Context Doctor plugin 2026-08-24 19:51:30 +03:00
hooks.py Install Context Doctor dependency after self-update 2026-08-25 23:40:31 +02:00
plugin.yaml Add Context Doctor plugin 2026-08-24 19:51:30 +03:00
README.md Context Doctor polish 2026-08-26 13:14:12 +00:00

Context Doctor

Repairs model tool call JSON before sending it to history and tool processing.

Behavior

  • Uses json_repair after native parsing has completed.
  • Accepts only complete Agent Zero tool calls (tool_name and object tool_args).
  • Stores repaired tool calls as compact JSON; log kvps retain streamed reasoning and add transformed fields.
  • Optionally replaces XML-like output with {} in cases where model uses native XML tool calls.