> ## Documentation Index
> Fetch the complete documentation index at: https://eispatch.framewire.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Approve and dispatch

> Lock your prompt with approval, dispatch it to the agent, and understand native dispatch, clipboard fallback, and Local Composer replay protection.

The composer separates **Edit**, **Approve**, and **Dispatch** so that the prompt sent to your agent is the one you reviewed. EISPATCH composes and hands off the prompt; your coding agent still executes it under its own permissions.

## Edit, approve, and dispatch

**1. Draft**

Compose the prompt, select capabilities, edit tasks, and edit the **Final Prompt**. Everything is editable.

**2. Approve**

Click **Approve** to lock the exact finalized prompt without executing it. **Dispatch** stays disabled until you approve.

**3. Dispatch**

Click **Dispatch** to send the approved text once. After dispatch, approve again before dispatching another prompt.

Clicking **Edit**, or changing the prompt, capabilities, or tasks after approval, invalidates the approval and returns the composer to draft.

## Cancel and Send Original Prompt

* **Cancel** aborts the composer session without dispatching anything.
* **Send Original Prompt** sends your original text without the compiled capabilities. It requires a two-step confirmation.

## Dispatch per host

| Host | Dispatch mode |
| - | - |
| Google Antigravity | **Native dispatch.** The MCP App sends the approved prompt into the same session with `app.sendMessage()`. |
| OpenAI Codex | **Clipboard fallback** (`clipboard-fallback`). The approved prompt is copied so you can paste and submit it in Codex. |
| Claude Code | **Clipboard fallback** (`clipboard-fallback`). The approved prompt is copied so you can paste and submit it in Claude Code. |
| OpenCode (experimental) | `client.session.prompt()` or HTTP `POST /session/:id/message` when a session is available; otherwise clipboard fallback. Native end-to-end verification is pending. |

If the browser clipboard API fails in clipboard-fallback mode, EISPATCH does not report success. It selects the approved prompt in **Final Prompt** so you can copy it with `Ctrl+C` or `Cmd+C`.

## Replay and integrity protection (Local Composer only)

Server-side approval tokens and SHA-256 prompt hashes are implemented only in the **Local Composer** used by Codex, Claude Code, and OpenCode. The Antigravity MCP App keeps approval state in the composer UI and does not issue tokens or hashes.

In the Local Composer, `POST /api/approve` returns an `approvalToken` and the SHA-256 `promptHash` of the exact prompt. `POST /api/dispatch` then returns:

| Status | Meaning |
| - | - |
| **401** | The `X-EISPATCH-Token` session token is missing or invalid. |
| **403** | No `approvalToken` was sent, or it is not the active approval (invalid, or cleared by a later compose, breakdown, or compile). |
| **409** | Replay (token already consumed or revoked) or tampering (prompt hash differs from the approved prompt). |

See [Local Composer API](https://eispatch.framewire.io/reference/local-composer-api.md) for request and response fields.

## Recursion prevention

Generated prompts start with this marker line:

```text theme={null}
<!-- DISPATCH_COMPILED_PROMPT v1.0 -->
```

Hooks for all four hosts pass through any prompt containing `<!-- DISPATCH_COMPILED_PROMPT` without opening the composer again, so pasting an approved prompt into Codex or Claude Code runs it normally.

> [!WARNING]
>
> If you rewrite the **Final Prompt** manually, EISPATCH sends your text verbatim. If you remove the marker line, a pasted prompt that starts with `/eispatch` will be intercepted again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.