delegate

delegate is a command for coding agents from LigphiDonk/Oh-my--paper. It costs 24 tokens per session (634 once invoked), scanned A, original, MIT.

A command that prepares a prompt for delegating coding or experiment work to another Codex session, with results written to shared project files.

In plain words
What is it for?
Reading project memory, presenting a task for confirmation, generating a Codex command, waiting for a completion marker, and reading the handoff result.
Why use it?
It gives delegated work a defined context, confirmation step, output location, and completion signal so the main project can track it.

Command

Part of the omp plugin — 9 commands, 5 agents, 3 hooks shipped together

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/ligphidonk/oh-my--paper/delegate
Clone the repo
git clone --depth 1 https://github.com/LigphiDonk/Oh-my--paper

Or install omp, the plugin that ships this one along with the rest of its 9 commands, 5 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for delegate

README.md
[![agentmods](https://agentmods.dev/badge/commands/ligphidonk/oh-my--paper/delegate.svg)](https://agentmods.dev/commands/ligphidonk/oh-my--paper/delegate)
Your own site
<a href="https://agentmods.dev/commands/ligphidonk/oh-my--paper/delegate"><img src="https://agentmods.dev/badge/commands/ligphidonk/oh-my--paper/delegate.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 634 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.00024 $0.00634
Opus 5 $0.00012 $0.00317
Sonnet 5 $0.00005 $0.00127
Haiku 4.5 $0.00002 $0.00063

Measured 5d ago against content hash fabefe2b3c83, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

delegate 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 5d ago.

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.

plugins/oh-my-paper/commands/delegate.md · 90 lines

What it actually says

必须使用 AskUserQuestion 工具进行所有确认步骤,不得用纯文字替代。

你是 Oh My Paper 研究项目的 Orchestrator。此命令专用于需要 Codex 执行的代码和实验任务

第一步:读取上下文

cat .pipeline/memory/project_truth.md
cat .pipeline/memory/agent_handoff.md
cat .pipeline/memory/decision_log.md
cat .pipeline/docs/research_brief.json

第二步:展示计划,等待确认

AskUserQuestion 向用户展示将要委派的任务摘要:

  • 任务内容:用 1-2 句话描述将交给 Codex 做什么
  • 注入的上下文:列出将附带哪些背景信息
  • 输出文件:Codex 完成后会写入哪个文件

选项:

  • 确认,生成 prompt
  • 我来调整任务描述
  • 取消

第三步:生成 Codex prompt(仅在确认后)

构建完整 prompt,格式如下:

[项目背景]
研究主题:(project_truth.md 前 10 行)
当前阶段:(research_brief.json 的 currentStage)

[已否决方向 - 不要重蹈]
(decision_log.md 最近 3 条,如有)

[上一步交接]
(agent_handoff.md 最近一条 Handoff 块,如有)

[你的任务]
(确认后的任务描述)

[输出要求]
完成后将结果摘要写入 .pipeline/memory/agent_handoff.md,
在文件末尾追加一行 <!-- CODEX_DONE -->

第四步:展示给用户复制执行

用代码块展示完整命令,告知用户在新终端里执行:

在新终端里运行:
codex "[完整 prompt]"

或后台运行:
codex --background "[完整 prompt]"

AskUserQuestion 询问:

  • 我已经在新终端里跑起来了
  • 取消

第五步:等待完成,读取结果

用户确认跑起来后,轮询等待完成信号:

# 每 10 秒检查一次,最多等 10 分钟
for i in $(seq 1 60); do
  grep -q "CODEX_DONE" .pipeline/memory/agent_handoff.md 2>/dev/null && break
  sleep 10
done
cat .pipeline/memory/agent_handoff.md | tail -30

读取结果后向用户简要说明:做了什么、产出了哪些文件、有没有问题。

AskUserQuestion 询问:

  • 接受结果,继续下一步
  • 需要 Codex 修改某处
  • 这个结果有问题,放弃
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. 5d ago First seen · 90 lines · 24 tokens per session scan A fabefe2b3c83

Subscribe to this mod's changes

delegate is a command published in the GitHub repository LigphiDonk/Oh-my--paper (721 stars, last pushed 4mo ago), licensed MIT. It adds 24 tokens to every session and 634 once invoked, about $0.0001 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.