Codex in a Minute · beginner
Codex in a Minute: Task specification
A good Codex task states outcome, constraints, and verification—so the agent can finish without inventing scope.
Last verified: 2026-09-06
In one sentence
A task specification is the contract between you and the agent: outcome, limits, and how success is checked.
Why it matters
Agents optimize for completing a request. If the request is fuzzy, they invent work. Clear specs shrink diffs, speed review, and make failures obvious.
How it works
Write tasks with four parts:
- Outcome — what should be true when finished;
- Scope — files/areas allowed;
- Constraints — what must not change;
- Verification — command or check that proves it.
Codex then plans and executes inside that box. You still review the diff. The spec does not replace judgment; it focuses it.
Example
Outcome: Contact form shows an inline error when email is empty.
Scope: form validation + related test only.
Constraints: Do not change webhook destinations or styling system.
Verify: npm test
Agentic coding use
Reusable task shapes beat clever one-off prompts. Teams that standardize specs get predictable agent output across Codex, Claude Code, and other tools.
Watch out
“Make it better” and “clean up as you go” are invitations to rewrite the world. If cleanup is needed, make it a second task with its own verification.