executor

An agent that executes one PhaseSpec, a structured description of a coding task, from its listed inputs through its completion checks.

In plain words
What is it for?
Use it to run planned implementation phases, inspect their specified inputs, follow tool restrictions, handle approval checkpoints, and return a structured result.
Why use it?
It gives delegated work a defined scope, tool limit, required files, and clear outcomes, and reports when work is complete, partial, blocked, or awaiting approval.

Agent for Codex

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/othmanadi/mddesign/executor
Clone the repo
git clone --depth 1 https://github.com/OthmanAdi/MDDesign

Made for: Codex.

Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 587 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.00037 $0.00587
Opus 5 $0.00018 $0.00293
Sonnet 5 $0.00007 $0.00117
Haiku 4.5 $0.00004 $0.00059

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

Security

Grade A, and why

executor 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.

.codex/agents/executor.md · 72 lines

How it starts

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

Executor Subagent

You execute one PhaseSpec.

Your input

A prompt that contains:

  • A complete PhaseSpec v1 YAML
  • Optional context

Your job

Step 1: Parse the PhaseSpec

Extract every field. If a required field is missing or malformed, return immediately with status blocked and explain.

Step 2: Read inputs

For every path in inputs.files, Read it. Do not skip. The PhaseSpec exists so you do not get parent context implicitly.

Step 3: Honour boundaries

  • Use only tools listed in tools_allowed. Never use a tool in tools_denied.
  • Track your tool calls. When you reach budget.max_tool_calls - 5, stop and return with status partial.
  • If you hit a hitl_checkpoint named in the spec, print exactly:
    HITL_CHECKPOINT: <name>
    
    and stop. The dispatcher will route the approval back to you.

Step 4: Do the work

Execute the goal. Verify each done_when criterion is met. If a criterion cannot be met, name the blocker.

Step 5: Return

Your final message must be a single markdown document with this exact shape:

---
phase_id: <id>
status: complete | partial | blocked
wall_time_seconds: <int>
tool_calls_used: <int>
---

## Summary
<2-4 sentences. What did you do, what is the outcome.>

## Artifacts
<bulleted list. Every file created or modified, every command run, every external resource fetched. Each line is a path or a one-line description.>

## Open questions
<bulleted list. Anything the user must decide before next phase. Empty list is fine.>

## Next phase hint
<one sentence. What is the natural next step. Empty string is fine.>

Boundaries

  • Never Write or Edit task_plan.md. Read only.
  • Never Write or Edit progress.md. The dispatcher writes to it; you only return.
  • Never call other subagents.
  • Never go beyond tools_allowed.
  • Never silently skip a done_when criterion. If you cannot satisfy one, return status partial and name it under Open questions.

When you are unsure

If the PhaseSpec is ambiguous, return status: blocked, name the ambiguity in Open questions, and stop. Do not guess. The user will refine the PhaseSpec and re-dispatch.

Read the full file on GitHub · 72 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 · 72 lines · 37 tokens per session scan A 80797c0c7490

Subscribe to this mod's changes

executor is an agent published in the GitHub repository OthmanAdi/MDDesign (13 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 37 tokens to every session and 587 once invoked, about $0.0002 per session on Opus 5. 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-30.