execute

A command that runs an automated implementation loop: it reads the planned task list, works through tasks, and continues until the work is complete.

In plain words
What is it for?
Use it to implement planned tasks, monitor the current phase and task, enforce task token limits, and view progress in the command output.
Why use it?
Implementing a large specification task by task can require repeated checks and progress tracking. The loop manages those iterations and shows current status.

Command

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 commands/lucasduys/forge/execute
Clone the repo
git clone --depth 1 https://github.com/LucasDuys/forge
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,313 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.00005 $0.03313
Opus 5 $0.00003 $0.01656
Sonnet 5 $0.00001 $0.00663
Haiku 4.5 $0.00001 $0.00331

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

Security

Grade A, and why

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

commands/execute.md · 225 lines

How it starts

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

Forge Execute

First-Run Wizard (R004.AC3)

Before anything else, fire the one-shot token-reduction wizard. Idempotent — prints once on first install, then no-ops forever. Suppressed when /forge:watch is rendering its own banner (R004.AC6).

node "${CLAUDE_PLUGIN_ROOT}/scripts/forge-wizard.cjs" --forge-dir .forge

Launch the autonomous implementation loop. Reads the frontier, implements tasks one by one, and relies on the Stop hook state machine to drive iteration until all tasks are complete.

Live status header. Every iteration of /forge:execute is automatically prefixed with a compact dashboard-style status block (phase, current task + step, agent, progress bar, tokens, per-task budget, lock status). You see what forge is doing without leaving Claude Code or running a separate command. The block is generated by scripts/forge-status-block.cjs, called from the Stop hook on every iteration. Opt out by setting execute.status_header: false in .forge/config.json. For a fullscreen ANSI dashboard in a separate terminal window, use /forge:watch instead.

New in v2.1

  • Token budgets are now enforced as hard ceilings, not warnings. Exhaustion transitions to budget_exhausted phase with a handoff doc at .forge/resume.md.
  • Git worktree isolation per task: each task runs in .forge/worktrees/{task-id}/ and is squash-merged on success.
  • Lock file acquisition at session start: refuses to run if another valid lock is held (unless stale >5min).
  • Per-task checkpoints at each step: resume picks up exactly where the last checkpoint was written.
  • Headless mode for CI: see node scripts/forge-tools.cjs headless execute --help for non-interactive usage with exit codes.

Pre-flight Check

The Forge workflow is strictly sequential: brainstorm -> plan -> execute. These pre-flight checks enforce that the prior phases completed correctly. If any check fails, stop and tell the user what to run first.

  1. Verify .forge/ exists. If it does not, stop and tell the user:

    .forge/ not found. Run /forge brainstorm first to generate specifications, then /forge plan to create task frontiers.

Read the full file on GitHub · 225 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 · 225 lines · 5 tokens per session scan A 9d8f16ee2f34

Subscribe to this mod's changes

execute is a command published in the GitHub repository LucasDuys/forge (55 stars, last pushed 1mo ago), licensed MIT. It adds 5 tokens to every session and 3,313 once invoked, about $0.0000 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.