Summary
Agent Zero v2.9 includes native xAI Grok OAuth (xai_grok_oauth, provider at plugins/_oauth/helpers/providers/xai_grok.py). Authentication and model routing work.
However, at least one Grok response tool-call shape is not normalized into the stock ResponseTool contract (text / message must be a non-empty string). Stock A0 raises RepairableException and the monologue repair loop can become unbounded, burning tokens and leaving the run active.
This is not "Grok unsupported." OAuth is present and connected. The defect is downstream of auth: tool arg shape × strict ResponseTool × unbounded repair retries.
Please do not ask operators to re-burn tokens reproducing this. One clean failure class is enough; evidence is held locally (redacted).
Related reliability class: open-ended monologue/tool-loop risk (see also #1088).
Environment (stock)
| Item |
Value |
| Commit |
baadd0dd0b09fa769a1027c183b964be85d5c8cc |
| Runtime |
Official agent0ai/agent-zero image @ that commit |
| Local core patches |
None (stock tools/response.py) |
| Chat |
xai_grok_oauth / grok-4.3 |
| Utility |
xai_grok_oauth / grok-code-fast-1 |
| Embedding |
huggingface / sentence-transformers/all-MiniLM-L6-v2 |
| OAuth |
Connected (access + refresh + id_token present) |
Stock contract that rejects Grok's call
# tools/response.py @ baadd0dd
async def execute(self, **kwargs):
for key in ("text", "message"):
message = self.args.get(key)
if isinstance(message, str) and message.strip():
return Response(message=message, break_loop=True)
raise RepairableException(
"response tool requires a non-empty top-level text or message string argument"
)
Call chain observed in UI tracebacks:
agent.py monologue → process_llm_result_tools → _execute_tool_request
→ plugins/_goal/tools/response.py → tools/response.py
RepairableException: response tool requires a non-empty top-level text or message string argument
Example malformed tool_args shape observed in logs
Grok emitted a structure equivalent to nesting non-string content under text (object, not plain string), e.g. conceptually:
{
"tool_name": "response",
"tool_args": {
"text": {
"user_message": "...",
"break_loop": true,
"attachments": []
}
}
}
Stock code requires tool_args.text (or message) to be a string. Nested objects fail isinstance(message, str) and raise RepairableException forever if the model does not converge.
Two surface symptoms (same defect)
1) Web UI (minimal repro / definitive)
- Ordinary short chat in the stock Web UI (Telegram not required).
- Grok produces valid answer content that appears in the UI.
- Then the run hits
RepairableException on the response tool and repeats (GEN/END / traceback cycles).
- Operator sees alternating normal prose + full stack traces for the same question.
2) Telegram (user-facing impact)
- Same underlying
response tool failure with native Grok OAuth.
- Manifests as endless typing, queued/garbled delivery, and/or a run that stays active.
- Telegram
/pause does not reliably terminate the underlying monologue/inference loop.
/stop is not exposed on the Telegram command surface used here.
Minimal repro (high level only — do not re-run for "more proof")
- Agent Zero v2.9 at
baadd0dd (unmodified core).
- Connect native xAI Grok OAuth; Default preset Main/Utility →
xai_grok_oauth models above.
- Web UI: new chat → short user message (e.g. a simple question).
- Observe: answer text may appear, then repeated
RepairableException on response tool / unbounded monologue steps.
Telegram is optional for maintainers; it is the same defect with worse operator control.
Expected
- Grok tool-calls for
response are accepted (normalize common shapes) or fail closed once with a clear error.
RepairableException for response-arg shape errors is bounded (max attempts), not an infinite token sink.
- Channel stop controls (Web UI + Telegram
/pause or equivalent) kill the active agent run and stop provider inference promptly.
Actual
- Valid-looking content can appear, then the final
response tool rejects Grok's arg shape.
- Repair retries loop without bound → token burn + stuck run.
- Telegram impact: endless typing / queued messages;
/pause insufficient.
What this is not
- Missing xAI provider / OAuth implementation (provider, config, and tests exist at this commit).
- API-key masquerade or third-party inference shim.
- A local fork of
tools/response.py (reproduced on stock code).
- "Telegram-only" (Web UI alone is enough).
Requests to maintainers
- Normalize Grok
response tool_args into the stock string contract or document/enforce the exact schema Grok is prompted to emit.
- Cap repair retries for response-tool shape failures (fail closed).
- Harden stop/pause so channel controls always terminate the monologue and stop xAI calls.
- Optional: log the raw tool_args (truncated) when
RepairableException fires to speed future provider debugging.
Happy to supply redacted logs / UI screenshots privately if useful. We are not applying local core patches; tracking this as an upstream integration edge on the new native Grok path.
Summary
Agent Zero v2.9 includes native xAI Grok OAuth (
xai_grok_oauth, provider atplugins/_oauth/helpers/providers/xai_grok.py). Authentication and model routing work.However, at least one Grok
responsetool-call shape is not normalized into the stockResponseToolcontract (text/messagemust be a non-empty string). Stock A0 raisesRepairableExceptionand the monologue repair loop can become unbounded, burning tokens and leaving the run active.This is not "Grok unsupported." OAuth is present and connected. The defect is downstream of auth: tool arg shape × strict
ResponseTool× unbounded repair retries.Please do not ask operators to re-burn tokens reproducing this. One clean failure class is enough; evidence is held locally (redacted).
Related reliability class: open-ended monologue/tool-loop risk (see also #1088).
Environment (stock)
baadd0dd0b09fa769a1027c183b964be85d5c8ccagent0ai/agent-zeroimage @ that committools/response.py)xai_grok_oauth/grok-4.3xai_grok_oauth/grok-code-fast-1huggingface/sentence-transformers/all-MiniLM-L6-v2Stock contract that rejects Grok's call
Call chain observed in UI tracebacks:
Example malformed
tool_argsshape observed in logsGrok emitted a structure equivalent to nesting non-string content under
text(object, not plain string), e.g. conceptually:{ "tool_name": "response", "tool_args": { "text": { "user_message": "...", "break_loop": true, "attachments": [] } } }Stock code requires
tool_args.text(ormessage) to be a string. Nested objects failisinstance(message, str)and raiseRepairableExceptionforever if the model does not converge.Two surface symptoms (same defect)
1) Web UI (minimal repro / definitive)
RepairableExceptionon theresponsetool and repeats (GEN/END / traceback cycles).2) Telegram (user-facing impact)
responsetool failure with native Grok OAuth./pausedoes not reliably terminate the underlying monologue/inference loop./stopis not exposed on the Telegram command surface used here.Minimal repro (high level only — do not re-run for "more proof")
baadd0dd(unmodified core).xai_grok_oauthmodels above.RepairableExceptiononresponsetool / unbounded monologue steps.Telegram is optional for maintainers; it is the same defect with worse operator control.
Expected
responseare accepted (normalize common shapes) or fail closed once with a clear error.RepairableExceptionfor response-arg shape errors is bounded (max attempts), not an infinite token sink./pauseor equivalent) kill the active agent run and stop provider inference promptly.Actual
responsetool rejects Grok's arg shape./pauseinsufficient.What this is not
tools/response.py(reproduced on stock code).Requests to maintainers
responsetool_args into the stock string contract or document/enforce the exact schema Grok is prompted to emit.RepairableExceptionfires to speed future provider debugging.Happy to supply redacted logs / UI screenshots privately if useful. We are not applying local core patches; tracking this as an upstream integration edge on the new native Grok path.