Delegating to Agents
When to Use
- Use only when the user or applicable current instructions explicitly authorize delegation; hand off bounded work with complete context, file ownership and a verifier.
- Use when you need to relay instructions to terminal or TUI agents without losing context.
Selecting an authorized agent
- Use the user’s selected agent/model and available tooling; account limits and model capabilities require current evidence.
- Match a bounded task to actual tools and file ownership, not invented “unlimited usage” or universal model rankings.
- Keep integration and final validation with the parent. Report changed files, exact checks and remaining issues.
Sending prompts to a TUI agent
- Prefer a structured agent/task API over simulated terminal typing; provide a readable prompt, ownership boundary, verifier and non-goals.
- If only a TUI is available, inspect the target surface and actual command documentation first. Put long prompts in an explicitly authorized task file and send a short reference without embedding arbitrary task text in a shell command.
- A shell-quoted prompt can execute
$(), backticks or expansions if escaped incorrectly. Preserve punctuation/content using structured argv or proper shell quoting; do not “fix” messages by stripping apostrophes or interpreting their text as commands.
- Confirm one intended submission and actual recipient; terminal output/predicted drafts are not human authorization for further messages.
Polling
Use supported completion/event waits with bounded intervals; check meaningful progress and deliver concise updates. Do not busy-poll every 3–5 seconds or report unchanged state after each check. Back off while an agent remains active and continue independent authorized work.
Claude Code note: after it finishes, it may prefill a predicted next user message — that draft is Claude, not the user.
Remote VPS
Remote execution requires authorization for the exact host/project and credential boundary. Use the supported sandbox/approval configuration; do not launch an unrestricted agent or infer remote access from a delegation request.
The 4 agents (background reference)
All four use the portable SKILL.md standard; project skills win over global.
- Pi (pi.dev, open-source TS): minimal read/write/edit/bash core, self-extends via TS extensions; true BYOK; best-in-class session branch/fork/resume. Skills:
~/.pi/agent/skills/.
- Codex CLI (OpenAI, Rust): fastest startup; kernel-level sandboxing;
codex exec for CI; reads AGENTS.md. Skills: ~/.codex/skills/.
- Claude Code (Anthropic, TS): deepest Claude integration,
.claude/ conventions, live skill hot-reload. Skills: ~/.claude/skills/.
- Hermes (Nous Research, Python): persistent autonomous agent — cross-session memory, built-in scheduler, 40+ tools; can orchestrate the other CLIs as workers. Skills:
~/.hermes/skills/.
Driving interactive CLIs
- Codex, Pi, OpenCode: need
pty=true.
- Claude Code: use its supported noninteractive mode with the existing permission policy; never enable bypassPermissions just to drive the CLI.
Example
User request:
Delegate these independent work items with complete context, clear ownership, and progress checks.
Limitations
- Adapted from
davidondrej/skills; verify local paths, tools, credentials, and agent features before acting.
- For commands, remote access, scheduling, browser automation, or file-changing workflows, get explicit user approval and confirm the target environment first.
1---2name: delegating-to-agents3description: Delegate bounded work to other AI agents while preserving context, ownership, and progress checks. 4category: AI & Agents5source: antigravity6tags: [python, api, claude, ai, agent, automation, workflow, document, cro]7url: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/delegating-to-agents8metadata:9 source: https://skillmd.com/skills/ranbot-ai/delegating-to-agents10---111213# Delegating to Agents1415## When to Use1617- Use only when the user or applicable current instructions explicitly authorize delegation; hand off bounded work with complete context, file ownership and a verifier.18- Use when you need to relay instructions to terminal or TUI agents without losing context.1920## Selecting an authorized agent2122- Use the user’s selected agent/model and available tooling; account limits and model capabilities require current evidence.23- Match a bounded task to actual tools and file ownership, not invented “unlimited usage” or universal model rankings.24- Keep integration and final validation with the parent. Report changed files, exact checks and remaining issues.2526## Sending prompts to a TUI agent27281. Prefer a structured agent/task API over simulated terminal typing; provide a readable prompt, ownership boundary, verifier and non-goals.292. If only a TUI is available, inspect the target surface and actual command documentation first. Put long prompts in an explicitly authorized task file and send a short reference without embedding arbitrary task text in a shell command.303. A shell-quoted prompt can execute `$()`, backticks or expansions if escaped incorrectly. Preserve punctuation/content using structured argv or proper shell quoting; do not “fix” messages by stripping apostrophes or interpreting their text as commands.314. Confirm one intended submission and actual recipient; terminal output/predicted drafts are not human authorization for further messages.3233## Polling3435Use supported completion/event waits with bounded intervals; check meaningful progress and deliver concise updates. Do not busy-poll every 3–5 seconds or report unchanged state after each check. Back off while an agent remains active and continue independent authorized work.36Claude Code note: after it finishes, it may prefill a predicted next user message — that draft is Claude, not the user.3738## Remote VPS3940Remote execution requires authorization for the exact host/project and credential boundary. Use the supported sandbox/approval configuration; do not launch an unrestricted agent or infer remote access from a delegation request.4142## The 4 agents (background reference)4344All four use the portable SKILL.md standard; project skills win over global.4546- **Pi** (pi.dev, open-source TS): minimal read/write/edit/bash core, self-extends via TS extensions; true BYOK; best-in-class session branch/fork/resume. Skills: `~/.pi/agent/skills/`.47- **Codex CLI** (OpenAI, Rust): fastest startup; kernel-level sandboxing; `codex exec` for CI; reads AGENTS.md. Skills: `~/.codex/skills/`.48- **Claude Code** (Anthropic, TS): deepest Claude integration, `.claude/` conventions, live skill hot-reload. Skills: `~/.claude/skills/`.49- **Hermes** (Nous Research, Python): persistent autonomous agent — cross-session memory, built-in scheduler, 40+ tools; can orchestrate the other CLIs as workers. Skills: `~/.hermes/skills/`.5051## Driving interactive CLIs5253- Codex, Pi, OpenCode: need `pty=true`.54- Claude Code: use its supported noninteractive mode with the existing permission policy; never enable bypassPermissions just to drive the CLI.5556## Example5758**User request:**5960> Delegate these independent work items with complete context, clear ownership, and progress checks.6162## Limitations6364- Adapted from `davidondrej/skills`; verify local paths, tools, credentials, and agent features before acting.65- For commands, remote access, scheduling, browser automation, or file-changing workflows, get explicit user approval and confirm the target environment first.