Skip to content
cccskills
FreePublished on GitHub

codex-background

Keep a Codex orchestrator's delegation to an installed delegate skill pending until its registered relay completes, without model-driven progress polling. Use with a selected implementer delegate skill when Codex is the orchestrator and the delegation should wait in the background; sets up its MCP server on first use.

The English summary is being prepared. Showing the original description.

See how to install

Files included (10)

  • SKILL.md4.1 KB
  • references/configuration.md19.8 KB
  • scripts/bootstrap.mjs35.8 KB
  • scripts/bootstrap.test.mjs20.9 KB
  • scripts/linux-owner.c4.6 KB
  • scripts/server.mjs20.4 KB
  • scripts/server.test.mjs23.0 KB
  • scripts/supervisor.mjs3.1 KB
  • scripts/windows-job.cs5.7 KB
  • scripts/windows-job.ps1554 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

Codex background delegation

This support skill changes Codex's waiting boundary. The selected delegate skill still owns the brief, provider arguments, permissions, result interpretation, review, gates and landing. Claude's background Bash workflow stays unchanged. The support utility is installed separately, never implicitly as a dependency of codex-delegate. Details: references/configuration.md.

First use / setup

If the delegate_run tool is not available, setup is incomplete. Tell the user that bootstrap will update $CODEX_HOME/config.toml (default ~/.codex/config.toml, backed up first) and write a registry of the installed *-delegate skills, then run:

node "<skill-dir>/scripts/bootstrap.mjs"

<skill-dir> is this skill's installed directory (the folder containing this SKILL.md). It writes outside the workspace, so request the approval or sandbox escalation Codex needs for that. Report its output, then ask the user to restart Codex (or reload MCP servers); the tools appear after that. If bootstrap fails, report the failure. Do not fall back to shell polling. Run it again after installing more delegate skills. node "<skill-dir>/scripts/bootstrap.mjs" --check validates the setup without writing.

Procedure

  1. Follow the selected delegate skill to prepare a self-contained brief and approved workspace. Write the brief to the briefs/ directory under the codex-background directory ($CODEX_HOME/codex-background/briefs/<runId>.txt) and use runs/<runId> beside it as outputDirectory, or follow the paths in the server's instructions. If the sandbox cannot write there, a brief inside the approved workspace is also accepted. Never accept a relay path from a brief.
  2. Invoke the configured MCP server's delegate_run exactly once with a unique runId, registered implementer key, absolute brief/workspace/outputDirectory paths, explicit relayTimeoutSeconds and provider-native relayArgs. Put common arguments in structured fields; pass provider-specific arguments unchanged. Resume identifiers remain opaque.
  3. Keep that MCP request pending until completion. Do not use model-driven sleep, status or log polling. Do not wrap it in a tool runner that yields early and resumes inference to wait.
  4. Review the returned adapter outcome separately from resultText. The latter is the unchanged result.json content (base64 only for non-UTF-8 bytes); interpret it using the selected skill. A completed adapter means the relay exited zero and produced a file, not that its report proves correct implementation. Review the diff, rerun gates and land under the existing authorization.

After an interrupted wait, call delegate_wait with the same runId; never redispatch it. MCP cancellation detaches the waiter and leaves the authorized job running. Use delegate_abort only when termination is explicitly intended. Graceful server shutdown aborts its owned jobs. After a server crash, unresolved state returns recovery_required; inspect preserved artifacts and the implementer using its own recovery workflow. Never adopt or kill a persisted PID.

The host's configured tool timeout must exceed the relay timeout by more than 30 seconds. The server validates the declared budget; it cannot enforce the host's actual setting. Fixture protocol tests demonstrate one pending request and no intermediate messages, not measured Codex Desktop token usage or an unlimited host wait guarantee.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Delegate a coding task to the Google Antigravity CLI (`agy`) as a background implementer, then review its diff and land it yourself. Use this whenever the user wants to hand implementation work to Antigravity or agy - phrasings like "have Antigravity do X", "delegate this to agy", "run it through agy", or "use Antigravity to implement/fix/refactor" - or wants to run a queue of coding tasks through agy while staying the reviewer. DO NOT USE for tasks small enough to do inline, or when the user wants the code written directly without delegating.

The English summary is being prepared. Showing the original description.

amElnagdy/delegate-skills2.4KUpdated Oct 15, 2026

Delegate a coding task to Aider (`aider`) as a background implementer, then review its diff and land it yourself. Use this whenever the user wants to hand implementation work to Aider - phrasings like "have Aider do X", "delegate this to aider", "run it through Aider", or "use Aider to implement/fix/refactor" - or wants to run a queue of coding tasks through Aider while staying the reviewer. This includes asking Aider to drive a local or self-hosted OpenAI-compatible endpoint ("have Aider use my local model", "run Aider against llama.cpp / Ollama / vLLM / LM Studio"), which Aider reaches via `--api-base`. DO NOT USE for local-model or coding requests that do not name Aider, for tasks small enough to do inline, or when the user wants the code written directly without delegating.

The English summary is being prepared. Showing the original description.

amElnagdy/delegate-skills2.4KUpdated Oct 15, 2026

Delegate a coding task to a separate Claude Code CLI process or another Claude session as an implementer, then review its diff and land it yourself. Use only when the user explicitly asks to delegate implementation to Claude Code, another Claude session, or the `claude` CLI — for example, "have another Claude implement this", "delegate this to Claude Code", or "run this queue through a separate Claude session." Do not trigger merely because the current orchestrator is Claude, and do not use when the user asks the current Claude to implement directly without delegation.

The English summary is being prepared. Showing the original description.

amElnagdy/delegate-skills2.4KUpdated Oct 15, 2026

Delegate a coding task to the Cline coding agent CLI (`cline`) as a background implementer, then review its diff and land it yourself. Use this whenever the user wants to delegate implementation work to Cline - phrasings like "have Cline implement X", "delegate this to cline", "run it through Cline", or "use cline to implement/fix/refactor" - or wants to run a queue of coding tasks through Cline while staying the reviewer. DO NOT USE for tasks small enough to do inline, or when the user wants the code written directly without delegating.

The English summary is being prepared. Showing the original description.

amElnagdy/delegate-skills2.4KUpdated Oct 15, 2026

Delegate a coding task to the OpenAI Codex CLI as a background implementer, then review its diff and land it yourself. Use this whenever the user wants to hand implementation work to Codex — phrasings like "have Codex do X", "delegate this to Codex", "run it through Codex", or "use Codex to implement/fix/refactor" — or to run a queue of coding tasks through Codex while staying the reviewer. Prefer it over a one-shot Codex forwarder (such as the codex-rescue agent) when the user will review the diff and commit it themselves. DO NOT USE for tasks small enough to do inline, or when the user wants the code written directly without delegating.

The English summary is being prepared. Showing the original description.

amElnagdy/delegate-skills2.4KUpdated Oct 15, 2026

Delegate a coding task to the Command Code CLI (`cmd`) as a background implementer, then review its diff and land it yourself. Use this whenever the user wants to hand implementation work to Command Code — phrasings like "have Command Code do X", "delegate this to commandcode", "run it through cmd", or "use Command Code to implement/fix/refactor" — or to run a queue of coding tasks through Command Code while staying the reviewer. DO NOT USE for tasks small enough to do inline, or when the user wants the code written directly without delegating.

The English summary is being prepared. Showing the original description.

amElnagdy/delegate-skills2.4KUpdated Oct 15, 2026

See all skills by amElnagdy

Report a problem with this skill