Skip to main content
Glama
jgt87
by jgt87

Start a Codex job

codex_start

Submit a self-contained coding task for background execution while you continue working. Use for slow refactors, migrations, bulk edits, and output-heavy work like generating tests or boilerplate.

Instructions

Hand a coding task to the Codex CLI and get a jobId back immediately — Codex runs in the background while you keep working. Two reasons to reach for it. One: the task is self-contained and slow (refactors, migrations, test writing, bulk edits across files), so running it in the background buys concurrency. Two: the task is self-contained and output-heavy (generating a lot of code, tests, or boilerplate), so letting Codex produce those tokens conserves your own usage — this reason holds even when the task is fast, because you and Codex bill separately. Codex edits files on disk directly in cwd, so treat the working tree as modified once the job finishes. Keep working while it runs; check codex_status when you need to and collect the answer with codex_result — don't re-check in a tight loop, since each check is a model turn. Still the wrong tool for a quick question you need answered right now, and for trivial triage or classification (relevance filtering, labelling, risky-or-not) send those to a local model instead — this returns a job id, not an answer, so anything cheaper to resolve another way should be. Model and reasoning effort are chosen automatically from the task text unless you set them; the choice and its reasoning come back in the response, and setting either one explicitly overrides it. Call codex_models to see what is available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYesAbsolute path to the directory Codex should treat as its working root.
modelNoPin the model instead of letting it be chosen from the task. Available: (model index unavailable; Codex config defaults apply). Omit to let routing pick one.
promptYesThe task for Codex. Be specific and self-contained: Codex cannot see this conversation, so restate the relevant context, constraints, and what 'done' looks like.
addDirsNoExtra absolute directories Codex may write to, beyond cwd.
sandboxNoread-only = cannot modify anything; workspace-write (default) = may edit files under cwd; danger-full-access = unrestricted, avoid unless the caller explicitly asked for it.
autoRouteNoDefault true. Set false to suppress automatic selection entirely and use only what you pass (or the Codex config defaults) — useful when the keyword heuristic misreads a task and you want no inference at all.
structuredNoDefault true: Codex must return a typed handoff report (summary, status, filesChanged, verification, followUps, blockers, confidence). Set false only when you want a long prose explanation and the structure would get in the way.
documentationNoDefault true for jobs that can write: Codex is asked to update the project's existing documentation when the change alters behaviour, adds a feature, or makes an existing statement untrue, and to report what it touched. It is told to edit existing docs rather than invent a changelog, and to skip when the change does not warrant any. Set false to suppress the instruction. Always off under read-only, which cannot write.
reasoningEffortNoHow hard the model should think, overriding your Codex config for this job only. Match it to the task: 'low' for mechanical work where the answer is obvious and the cost is typing (renames, moving files, applying a stated pattern); 'medium' for ordinary implementation; 'high' or 'xhigh' for genuinely hard reasoning — tricky concurrency, subtle logic, design decisions with real trade-offs. Higher settings cost more and take longer, so raising it for simple work buys nothing. Note that accepted values vary by model: 'none', 'low', 'medium', 'high' and 'xhigh' are widely supported, while 'minimal' and 'max' are rejected by some models and will fail the job on its first API call. Omit to inherit the config default.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description bears full responsibility. It fully discloses that Codex edits files on disk in cwd, that jobs run in the background, and warns against tight polling loops. It explains automatic model/reasoning-effort selection, default behaviors for structured, documentation, and autoRoute, and the implications of each sandbox setting.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy (over 400 words) but every sentence serves a purpose. It is front-loaded with the core action and use cases, then systematically covers behavioral details and parameter guidance. While slightly verbose, the density of information justifies the length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 9 parameters, no output schema, and no annotations, the description covers all necessary behavioral and contextual details: what is returned (jobId), how to interact with sibling tools (status, result), file system effects, parameter defaults, and when to override each. It is thorough and leaves no obvious gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, but the description significantly enriches each parameter beyond the schema. It explains when to set structured=false (long prose), why documentation defaults true, how reasoningEffort maps to task complexity, and the meaning of sandbox levels. This adds substantial value for an agent.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: handing a coding task to Codex CLI and receiving a jobId immediately for background execution. It specifies the verb ('hand a coding task'), resource ('Codex CLI'), and distinguishes from sibling tools by emphasizing that it returns a jobId, not an answer. The two use cases (slow tasks and output-heavy tasks) further clarify its role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use criteria (self-contained slow or output-heavy tasks) and when-not-to-use (quick questions, trivial triage/classification). It even suggests an alternative: 'send those to a local model instead.' This is comprehensive and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jgt87/codex-offload-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server