Repository navigation
Closed
Copy link
Labels
Description
Summary
CLI PR inference-gateway/cli#1041 (fixes inference-gateway/cli#1040) renames the headless command and reworks its output formats. All CLI documentation that references infer agent or --output-format is now stale, and the new json-pretty format is undocumented.
Changes to document (source PR: inference-gateway/cli#1041):
infer agentis renamed toinfer headless(no alias). Flags otherwise unchanged:-m/--model,--files,--no-save,--session-id,--require-approval,--heartbeat,--remote,--result-file.--output-formatis renamed to--format, with valuesjson(default),json-pretty(new),ag-ui,text.json-pretty(new): same per-turn stream asjsonwith each object indented across multiple lines for human reading; machine consumers should keep usingjson.- The
jsonstream emits messages per turn as they happen: aninfoline, assistant lines (content,reasoning_content,tool_calls,token_usage), tool result lines,approval_requestlines, and a finalsession_statsline. - Tool result lines: the legacy
Result of tool call:/Tool execution failed:content envelope is removed.contentis the bare marshaled tool execution result on success, or the bare error detail on failure; structuredtool_executionmetadata (tool_name,success,error,rejected,duration) and thefailedflag ride alongside. - Failures before the stream starts (gateway unavailable, unknown model) emit a machine-readable
{"type":"agent_error",...}line on stdout (RUN_ERRORforag-ui) in addition to the non-zero exit code. ag-uiemits spec-compliantTEXT_MESSAGE_START/CONTENT/END(and reasoning) framing with a fresh message id per turn.- Exit codes: 0 task completed, 1 task failed, 2 max turns exhausted.
- Headless runs force headless subagents (never tmux/interactive), regardless of
tools.agent.mode. - Headless runs wait for in-flight background tasks (background shells, A2A tasks) before completing, bounded by
a2a.task.agent_mode_max_wait_seconds. - Headless runs honor session rollover (compact): long conversations roll over into a new session id automatically, at startup and between turns. A non-UUID
--session-idis treated as a session-group key that follows rollovers (used by channels).
Acceptance Criteria
- Every
infer agentreference in the docs is updated toinfer headless(the separateinfer agentsA2A registry command is unrelated and must not be renamed) - The headless command page documents
--formatwith all four values, including ajson-prettyexample, and notes the--output-formatrename - The json stream line shapes (info, assistant, tool, approval_request, session_stats) and exit codes are documented, including the bare tool-result content (no legacy envelope) and pre-run
agent_errorlines - The headless subagent, background-task completion, and session rollover / group-key behaviors are mentioned on the headless page
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Aug 11, 2026
@infer Can you work on this? use /ponytail:ponytail
inference-gateway-maintainer commentedon Aug 11, 2026
Model:
ollama_cloud/deepseek-v4-flash:preview· View JobTodos
infer agentreferences and headless docsinfer agentreferences toinfer headless(but NOTinfer agents) in cli.mdinfer agentreferences in other docs files (cli-hooks.md, cli-skills.md, cli-channels.md, a2a.md, desktop.md, github-action.md)Pull Request
#542
✅ Infer Result: Success
All tasks complete. Here's a summary of what was done:
Updated 7 files (cli.md, cli-hooks.md, cli-skills.md, cli-channels.md, a2a.md, desktop.md, github-action.md) - every
infer agentreference renamed toinfer headless, preserving allinfer agents(the A2A registry command) unchanged.In cli.md, the headless section was significantly expanded:
--formatflag (renamed from--output-format) documented with all four values:json(default),json-pretty,ag-ui,text- with ajson-prettybash exampleinfo(run metadata),assistant(content/reasoning/tool_calls/token_usage),tool(bare marshaled result, no legacy envelope),approval_request,session_stats(token/cost summary), andagent_error(pre-stream failures, emitted asRUN_ERRORfor ag-ui)a2a.task.agent_mode_max_wait_seconds, automatic session rollover with non-UUID group-key supportDraft PR: #542 - available for review at #542.
Model:
ollama_cloud/deepseek-v4-flash:preview· Exit Code:0· Duration: 7m 50sTokens: 7,973,320 in · 31,086 out · 8,004,406 total (55 requests)
Tool calls: 137 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS
inference-gateway-releaser commentedon Aug 17, 2026
🎉 This issue has been resolved in version 0.9.11 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀