cli

A reference for running coding agents from the command line, including Codex planning and review calls. It defines how to select models and reasoning effort from project configuration.

In plain words
What is it for?
Building orchestrators and scripts that launch read-only agent reviews and planning tasks with temporary prompts and output files.
Why use it?
It prevents runners from using inconsistent settings, interactive input, or unsafe write access during automated work.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/bita71/agent-workflow-kit/cli
Clone the repo
git clone --depth 1 https://github.com/Bita71/Agent-Workflow-Kit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 481 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00481
Opus 5 $0.00000 $0.00241
Sonnet 5 $0.00000 $0.00096
Haiku 4.5 $0.00000 $0.00048

Measured yesterday against content hash fe4f870b0305, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/ai/agents/cli.md · 56 lines

How it starts

The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent CLI Calls

Canonical invocation shapes for orchestrators and runners. Read model/effort values from .agent-workflow-kit/config.conf; never duplicate concrete IDs here.

Codex

Planning and review calls run read-only:

codex exec "<prompt>" \
  -s read-only \
  -C <absolute-path-to-repo-root> \
  -c model_reasoning_effort=<resolved-effort> \
  -o <outfile>
  • Use the model key for the role. If it is auto, omit -m; otherwise add -m <configured-model>.
  • Resolve ordinary effort from the requested workflow label. Resolve max to CODEX_MAX_EFFORT; if the CLI rejects a configured value, report the config mismatch rather than guessing.
  • Keep -s read-only. The caller writes plans/reviews from returned Markdown.
  • <outfile> is a temporary file outside the repository. Delete it after reading; if it is empty, use stdout, and treat an empty successful response as failure.
  • Put long prompts in a temporary file rather than hand-escaping them.
  • Background calls must not inherit interactive stdin; connect stdin to /dev/null in the POSIX runner.
  • Long calls may take tens of minutes. Use an appropriate timeout and surface rate limits instead of silently switching roles/models.

Native host agents

Claude Code and Cursor use their tracked build and review-design agents when the workflow calls for native implementation or design review. The adapters read the same config and active profiles. Review agents return text to the caller; they do not write artifacts.

Claude CLI for external runners

When a runner cannot use native agents:

claude -p "<prompt>" \
  --output-format text \
  --permission-mode auto \
  --settings <sandbox.settings.json>
  • If the configured role model is not auto, add --model <configured-model>.
  • For review mode, add --disallowedTools "Edit Write NotebookEdit".
  • Build/fix mode may edit only inside the runner sandbox.
  • Sandbox and POSIX prerequisites are documented in docs/ai/recipes/sandboxes.md and docs/ai/setup.md.

Read the full file on GitHub · 56 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 56 lines · 0 tokens per session scan A fe4f870b0305

Subscribe to this mod's changes

cli is an agent published in the GitHub repository Bita71/Agent-Workflow-Kit (1 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 481 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.