You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DOCS] Document the auto-with-judge agent mode and judge.yaml #633
The CLI gained a new agent mode, auto-with-judge, and a new approval behaviour, tools.safety.approval_behaviour: judge: an LLM judge decides approval-requiring tool calls against the user's latest request instead of a human. It is configured through a new .infer/judge.yaml sidecar (model, timeout, max_tokens, on_error, prompt) with INFER_JUDGE_* env overrides, plus an infer headless --mode auto-with-judge flag. Disabled by default; standard/plan/auto behavior is unchanged.
Affected pages
docs/configuration-reference.md - document tools.safety.approval_behaviour: judge and the new judge.yaml file (next to hooks.yaml / reminders.yaml), including INFER_JUDGE_* env overrides and the fail-fast rule when no judge model is resolvable
docs/shortcuts-guide.md - auto-with-judge in the Shift+Tab cycle and its display name "Auto+Judge"
New page: docs/judge-mode.md - how the judge gate works (input = latest non-hidden user message + pending tool call, JSON verdict contract, on_error deny/allow, judge_verdict event, headless --mode)
docs/browser-extension-protocol.md - already updated in the implementing PR (mode frame now carries the canonical keys standard, plan, auto, auto-with-judge)
Acceptance
judge.yaml documented next to hooks.yaml / reminders.yaml in the configuration reference
shortcuts guide lists auto-with-judge in the mode cycle
judge-mode page covers the verdict contract, on_error semantics, observability, and headless usage
Review follow-ups on the implementing PR (inference-gateway/cli#1148) changed the user-facing surface. Please fold these into the pages listed above:
judge.yaml gained system_prompt (the judge's instructions, sent as a system message) and gateway_url (send judge calls to a different gateway than the agent's, e.g. a real judge while the driver runs against the mock). The default prompt is now a user-message template that wraps the intent and tool call in <user_request> and <tool_call> tags; the instructions live in system_prompt. New env overrides: INFER_JUDGE_SYSTEM_PROMPT, INFER_JUDGE_GATEWAY_URL.
A judge rejection no longer ends the turn. It becomes a failed tool result whose content reads rejected by judge: <model>: <reason>, and the driver continues with that reason. Only a human rejection ends the turn.
The judge model is visible everywhere: the AUTO+JUDGE mode indicator shows AUTO+JUDGE - <model>, the TUI flash reads Action rejected by judge policy (<model>): <reason>, and the judge_verdict line (json, ag-ui, debug) carries a model field.
With debug logging on, every judge call also emits a judge_request debug event with the model, system prompt, and rendered user prompt.
Judge token usage is added to session totals and telemetry under the judge model, so /stats shows the judge on its own row when it runs on a different model than the agent.
tools.safety.approval_behaviour: judge is the only setting that makes config validation require a resolvable judge model; the auto-with-judge mode is validated by the headless runner at start (--mode or INFER_AGENT_MODE).
The in-repo pages docs/judge-mode.md and docs/configuration-reference.md on the PR branch already reflect all of this and can be used as the source text.
bun run lint:md, bun run format:check, bun run build all pass; anchors verified against built HTML
Committed and opened the PR
What changed
This repo does not mirror the CLI repo's docs/ filenames, so the content was mapped onto the existing structure: a standalone cli-judge-mode.md page (sibling of cli-hooks.md) plus targeted edits in the big cli.md reference.
New cli-judge-mode.md covers: entering the mode (Shift+Tab -> Auto+Judge, --mode auto-with-judge, INFER_AGENT_MODE, browser-bridge mode keys), what reaches the judge, the JSON verdict contract, the full judge.yaml schema (model, gateway_url, timeout, max_tokens, on_error, system_prompt, prompt with {root_intent}/{intent}/{action}) and all seven INFER_JUDGE_* overrides, on_error deny/allow semantics, model resolution and the fail-fast rules, approval_behaviour: judge without the mode, and observability (judge_verdict with model, judge_request debug event, TUI flash, judge tokens in session totals/telemetry//stats). Rejections are documented as failed tool results (rejected by judge: <model>: <reason>) that continue the turn - only a human rejection ends it.
cli.md: Shift+Tab cycle, mode table row, new "Auto+Judge Mode" section, judge.yaml next to hooks.yaml/reminders.yaml in the configuration-files table, judge row in the approval_behaviour table plus the validation note (config validation only requires a judge model for approval_behaviour: judge; the mode is validated by the headless runner), a judge_verdict row in the headless stream-event table, and a pointer from "Headless secure-by-default".
ASCII only, no en/em dashes in the new text. Three pre-existing em dashes elsewhere in cli.md were left untouched as out of scope - say the word if you want them cleaned up too.
| Branch
Activity
edenreich commentedon Sep 2, 2026
Review follow-ups on the implementing PR (inference-gateway/cli#1148) changed the user-facing surface. Please fold these into the pages listed above:
system_prompt(the judge's instructions, sent as a system message) andgateway_url(send judge calls to a different gateway than the agent's, e.g. a real judge while the driver runs against the mock). The defaultpromptis now a user-message template that wraps the intent and tool call in<user_request>and<tool_call>tags; the instructions live insystem_prompt. New env overrides:INFER_JUDGE_SYSTEM_PROMPT,INFER_JUDGE_GATEWAY_URL.rejected by judge: <model>: <reason>, and the driver continues with that reason. Only a human rejection ends the turn.AUTO+JUDGEmode indicator showsAUTO+JUDGE - <model>, the TUI flash readsAction rejected by judge policy (<model>): <reason>, and thejudge_verdictline (json, ag-ui, debug) carries amodelfield.judge_requestdebug event with the model, system prompt, and rendered user prompt./statsshows the judge on its own row when it runs on a different model than the agent.tools.safety.approval_behaviour: judgeis the only setting that makes config validation require a resolvable judge model; theauto-with-judgemode is validated by the headless runner at start (--modeorINFER_AGENT_MODE).The in-repo pages
docs/judge-mode.mdanddocs/configuration-reference.mdon the PR branch already reflect all of this and can be used as the source text.feat(agent): add auto-with-judge mode with an LLM judge as the tool a…
edenreich commentedon Sep 2, 2026
@claude Can you work on this? use /ponytail:ponytail
inference-gateway-maintainer commentedon Sep 2, 2026
Claude finished @edenreich's task in 5m 0s —— View job •
docs/issue-633-20260902-1907• [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-633-20260902-1907?quick_pull=1&title=Issue%20%23633%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23633%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Done - PR #634
cli-judge-mode.mdcli.md(mode cycle, Auto+Judge section, config-file table,approval_behaviour,judge_verdictevent)bun run lint:md,bun run format:check,bun run buildall pass; anchors verified against built HTMLWhat changed
This repo does not mirror the CLI repo's
docs/filenames, so the content was mapped onto the existing structure: a standalonecli-judge-mode.mdpage (sibling ofcli-hooks.md) plus targeted edits in the bigcli.mdreference.New
cli-judge-mode.mdcovers: entering the mode (Shift+Tab ->Auto+Judge,--mode auto-with-judge,INFER_AGENT_MODE, browser-bridge mode keys), what reaches the judge, the JSON verdict contract, the fulljudge.yamlschema (model,gateway_url,timeout,max_tokens,on_error,system_prompt,promptwith{root_intent}/{intent}/{action}) and all sevenINFER_JUDGE_*overrides,on_errordeny/allow semantics, model resolution and the fail-fast rules,approval_behaviour: judgewithout the mode, and observability (judge_verdictwithmodel,judge_requestdebug event, TUI flash, judge tokens in session totals/telemetry//stats). Rejections are documented as failed tool results (rejected by judge: <model>: <reason>) that continue the turn - only a human rejection ends it.cli.md: Shift+Tab cycle, mode table row, new "Auto+Judge Mode" section,judge.yamlnext tohooks.yaml/reminders.yamlin the configuration-files table,judgerow in theapproval_behaviourtable plus the validation note (config validation only requires a judge model forapproval_behaviour: judge; the mode is validated by the headless runner), ajudge_verdictrow in the headless stream-event table, and a pointer from "Headless secure-by-default".ASCII only, no en/em dashes in the new text. Three pre-existing em dashes elsewhere in
cli.mdwere left untouched as out of scope - say the word if you want them cleaned up too.| Branch
inference-gateway-releaser commentedon Sep 22, 2026
🎉 This issue has been resolved in version 0.9.14 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀