execute-goal

A command that turns the goal in the current conversation and its arguments into a self-contained implementation request, then starts the implementation process.

In plain words
What is it for?
Starting an implementation from an existing conversation, including when the command arguments are brief references such as “do it.”
Why use it?
Coding tasks can lose important requirements when they are passed between steps or referred to vaguely. This command resolves the intended goal and carries forward the relevant constraints and acceptance criteria.

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/chriswritescode-dev/opencode-forge/execute-goal
Clone the repo
git clone --depth 1 https://github.com/chriswritescode-dev/opencode-forge
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 504 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.00504
Opus 5 $0.00000 $0.00252
Sonnet 5 $0.00000 $0.00101
Haiku 4.5 $0.00000 $0.00050

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

Security

Grade A, and why

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

src/prompts/commands/execute-goal.md · 30 lines

How it starts

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

Step 1: Validate the Goal

Resolve the goal from $ARGUMENTS and the surrounding conversation. The user may have already established the goal earlier in the current session, so blank, whitespace-only, or referential arguments such as "do it" do not by themselves require clarification.

If you are unsure what the goal is, or if its scope is ambiguous in a way that could materially change the implementation, use the question tool to ask a focused clarifying question and stop until the user answers. Do not guess consequential requirements or scope. Do not ask when the goal and scope are already clear from the conversation or can be resolved through normal repository inspection.

Turn the resolved goal into a self-contained implementation request. Include the relevant requirements, constraints, file or issue references, and acceptance criteria already established in the conversation, but do not invent details or include unrelated context. When newer instructions conflict with earlier ones, follow the user's latest explicit instruction.

Do NOT create a plan, decompose the goal into sections, or ask for approval. The goal is implemented directly by the loop.

Step 2: Start the Goal Loop

Call the execute-goal tool with the full, self-contained goal text:

  • goal: Required. The complete resolved goal, not necessarily the literal $ARGUMENTS. The new dedicated session does not inherit this conversation, so expand blank or referential arguments with the necessary context established above.
  • title: Optional short title. Derived from the goal when omitted.
  • loopName: Optional loop name. Forge slugifies it and auto-increments on collision.
  • maxIterations: Optional maximum loop iterations. Defaults to the plugin config loop.defaultMaxIterations.

This creates an isolated Forge worktree and a new dedicated code session inside it, sends the goal as that session's initial prompt, and starts the watchdog. msb microVM sandboxing is used automatically when configured and available.

Read the full file on GitHub · 30 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 · 30 lines · 0 tokens per session scan A 1dc9e289f428

Subscribe to this mod's changes

execute-goal is a command published in the GitHub repository chriswritescode-dev/opencode-forge (11 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 504 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-30.