codex-background — скилл для Codex: фоновое делегирование
Скилл удерживает делегирование Codex в ожидании, пока завершится relay установленного скилла-исполнителя. Нужен, когда агент должен дождаться фоновой задачи без опроса статуса моделью.
npx skills add amElnagdy/delegate-skills --skill codex-background -a claude-codeЧто делает codex-background
Codex вызывает MCP-инструмент delegate_run один раз и ждёт завершения relay. Скилл задаёт порядок передачи брифа и путей, а после ответа предлагает отдельно проверить результат, diff и проектные проверки: завершение relay само по себе не подтверждает правильность реализации. Если ожидание прервалось, продолжайте через delegate_wait с тем же runId, не запускайте задачу повторно.
При первом использовании, если delegate_run недоступен, настройте сервер командой node "<skill-dir>/scripts/bootstrap.mjs"; она меняет $CODEX_HOME/config.toml и создаёт реестр установленных delegate-скиллов. Нужны Node 18+, установленный скилл-исполнитель и его аутентифицированный CLI. На Windows требуется inbox Windows PowerShell с Add-Type, на Linux — /usr/bin/cc и procfs; другие хосты не поддерживаются. Тайм-аут инструмента Codex должен превышать relay timeout более чем на 30 секунд.
Какие задачи решает
- дождаться завершения делегированной задачи без опроса статуса моделью
- передать исполнителю бриф и пути через MCP
- продолжить ожидание прерванного relay с прежним
runId - проверить результат делегирования отдельно от статуса завершения
Примеры запросов агенту
- Запусти выбранный скилл-исполнитель в фоне и жди завершения relay без опроса статуса.
- Продолжи ожидание задачи с тем же
runId, не запускай её повторно. - После ответа проверь результат, diff и проектные проверки.
Как установить codex-background
1Через Skills CLI (Vercel)
npx skills add amElnagdy/delegate-skills --skill codex-background -a claude-code2Вручную: положить файлы
~/.claude/skills/codex-background/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/codex-background/
1Через Skills CLI (Vercel)
npx skills add amElnagdy/delegate-skills --skill codex-background -a codex2Вручную: положить файлы
.agents/skills/codex-background/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add amElnagdy/delegate-skills --skill codex-background -a cursor2Вручную: положить файлы
.cursor/skills/codex-background/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install amElnagdy/delegate-skills codex-background2Вручную: положить файлы
.github/skills/codex-background/SKILL.md1Через Skills CLI (Vercel)
npx skills add amElnagdy/delegate-skills --skill codex-background -a gemini-cli2Командой платформы
gemini skills install https://github.com/amElnagdy/delegate-skills --path skills/codex-backgroundВручную: положить файлы
.devin/skills/codex-background/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add amElnagdy/delegate-skills --skill codex-background -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о codex-background
Как установить codex-background в Codex?
Выполните npx skills add amElnagdy/delegate-skills --skill codex-background -a codex. Скилл появится в .agents/skills/codex-background/SKILL.md.
Что делает codex-background?
Он удерживает MCP-вызов делегирования в ожидании завершения relay, без опроса прогресса моделью. Результат и изменения в проекте нужно проверить отдельно.
Что нужно для работы codex-background?
Нужны Node 18+, установленный скилл-исполнитель с аутентифицированным CLI и настроенный MCP-хост Codex. Тайм-аут инструмента хоста должен превышать relay timeout более чем на 30 секунд.
Исходный текст
SKILL.md · MIT
--- name: codex-background description: 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. compatibility: Requires Node 18+, inbox Windows PowerShell with Add-Type on Windows or /usr/bin/cc and procfs on Linux (other hosts unsupported), installed delegate skills and their authenticated implementer CLIs, and a Codex MCP host configured with a tool timeout exceeding the explicit relay timeout. metadata: version: 0.5.0 --- # 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](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: ```bash 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.
© amElnagdy · MIT · amElnagdy/delegate-skills