---
title: "Implement: Dispatch envelope"
description: "When dispatching subagents , whether via the in-session Agent tool or a headless claude -p --bare from a wrapper script , set explicit --permission-mode and..."
canonical: "https://orchestkit.dev/docs/reference/skills/implement/references/dispatch-envelope"
---

# Implement: Dispatch envelope

When dispatching subagents , whether via the in-session Agent tool or a headless claude -p --bare from a wrapper script , set explicit --permission-mode and...

> Part of the [Implement](/docs/reference/skills/implement) skill reference. The main page carries the skill itself; this page holds material that used to sit at the bottom of it.

## Dispatch envelope (CC 2.1.142+ flags , M146-6 / #1849)

When dispatching subagents , whether via the in-session `Agent` tool or a headless `claude -p --bare` from a wrapper script , set explicit `--permission-mode` and `--effort` per agent role so behaviour is deterministic across interactive vs CI runs:

| Agent role | `--permission-mode` | `--effort` | Rationale |
|---|---|---|---|
| Read-only analysis (`Explore`, `code-quality-reviewer`, `debug-investigator`) | `dontAsk` | `low` | No writes, no risk; minimise cost. |
| Test generation (`test-generator`) | `acceptEdits` | `medium` | Writes test files; permission prompts would block the parallel sweep. |
| Production code (`frontend-ui-developer`, `backend-system-architect`) | `default` or `acceptEdits` | `medium` to `high` | Set per-feature complexity. `default` keeps the user in the loop. |
| **Never** | `bypassPermissions` | , | Skip the audit trail , only acceptable in throwaway sandboxes. |

In-session `Agent` tool calls inherit the parent session's permission mode; the table is the **policy** for what those defaults should be. For genuinely headless invocations (cron, CI), pass the flags explicitly to `claude -p --bare`:

```bash
claude -p --bare \
  --permission-mode dontAsk \
  --effort low \
  --max-turns 8 \
  "<prompt>"
```
