acp-background-runs
Route requests for ACP or external coding agents such as Codex, Claude Code, Gemini CLI, and OpenCode into non-blocking OpenClaw background ACP runs instead of executing synchronously in the current chat. Use when a user wants to hand coding work to an external agent and expects the current conversation to continue without waiting. Triggers: "ACP", "Codex", "Claude Code", "Gemini CLI", "OpenCode", "background run", "background task".
Best use case
acp-background-runs is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Route requests for ACP or external coding agents such as Codex, Claude Code, Gemini CLI, and OpenCode into non-blocking OpenClaw background ACP runs instead of executing synchronously in the current chat. Use when a user wants to hand coding work to an external agent and expects the current conversation to continue without waiting. Triggers: "ACP", "Codex", "Claude Code", "Gemini CLI", "OpenCode", "background run", "background task".
Teams using acp-background-runs should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/acp-background-runs/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How acp-background-runs Compares
| Feature / Agent | acp-background-runs | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Route requests for ACP or external coding agents such as Codex, Claude Code, Gemini CLI, and OpenCode into non-blocking OpenClaw background ACP runs instead of executing synchronously in the current chat. Use when a user wants to hand coding work to an external agent and expects the current conversation to continue without waiting. Triggers: "ACP", "Codex", "Claude Code", "Gemini CLI", "OpenCode", "background run", "background task".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
SKILL.md Source
# ACP / Codex Background Runs
When a user asks to use ACP or an external coding agent such as Codex, Claude Code, Gemini CLI, or OpenCode, do not execute the task synchronously in the current chat. Route it through the ACP runtime instead.
## Default Rules
- Prefer `sessions_spawn` and set `runtime: "acp"` with the appropriate `agentId`
- Default to `mode: "run"`
- Only use `thread: true` or `mode: "session"` when the user explicitly asks for an ongoing interactive or thread-bound session
- Set `cwd` when the target repository or directory is known
- Prefer absolute paths for `cwd`; do not pass `~` directly, expand it first
- Use a relaxed `runTimeoutSeconds` for longer tasks; do not mechanically default to `300`
- Do not wait in the current conversation and do not poll for progress
- Reply immediately after submission that the task has been accepted and is running in the background
- Rely on `sessions_spawn` completion notifications to send the final result back to the current conversation
- Only add `streamTo: "parent"` when the user explicitly asks for progress updates
## Default Handling
If the user is simply dispatching an ACP / Codex task and does not explicitly request a persistent interactive session, treat it as a one-shot background run. Do not block the current conversation. Send the result back only when the background run completes.
## Timeout Guidance
- Quick read-only checks, short analysis, light tasks: `runTimeoutSeconds: 120-300`
- Normal coding tasks, project inspection, small scoped edits: `runTimeoutSeconds: 600`
- Research, code changes, file generation, test runs, longer reports: `runTimeoutSeconds: 1200`
- Clearly long-running tasks: increase further to `1800-3600` as needed
- Do not default to `0`; only use `0` when the user explicitly wants no timeout
## `mode` / `thread` Decision Rules
- If the user only wants the external agent to finish a task in the background, use `mode: "run"`
- If the user explicitly wants to continue talking to the same external-agent context afterward, use `thread: true`
- If the user explicitly asks for a persistent session, thread session, or long-lived context, use both `thread: true` and `mode: "session"`
- If there is no explicit need for ongoing interaction, do not open `mode: "session"`
## `cwd` Rules
- If the target repository, project directory, or work directory is known, set `cwd`
- Prefer absolute paths
- Expand `~` before passing the path into `sessions_spawn`
- If the user did not give a directory but the task clearly targets a known repo, resolve the actual path from context before spawning
## Fallback When ACP Is Unavailable
- Try `runtime: "acp"` first
- Only fall back to `runtime: "subagent"` when the ACP target `agentId` is clearly unavailable, unconfigured, or ACP cannot be used in the current environment
- When falling back, tell the user explicitly that the task is being run via `subagent`, not a native ACP session
- Do not silently fall back
## Reply After Submission
Use this short confirmation by default:
`Task accepted. It is running in the background and will report back here when complete.`
If `streamTo: "parent"` is enabled, also say that key progress updates will be streamed back.
## Prohibited Actions
- Do not execute external coding-agent tasks synchronously in the current conversation when they should go through ACP
- Do not poll after submission
- Do not call `sessions_list`, `sessions_history`, or similar tools to track child-session progress
- Do not use `sleep` or timer-based waiting to fake background orchestration
- Rely on the `sessions_spawn` completion / announce mechanism for the final result
## Recommended Parameter Template
```json
{
"task": "<user request>",
"runtime": "acp",
"agentId": "<codex|claude|gemini|opencode|...>",
"mode": "run",
"cwd": "/abs/path/if-known",
"runTimeoutSeconds": 300
}
```
## When To Adjust
- Need ongoing multi-turn context: add `thread: true` and, if needed, `mode: "session"`
- Task may run for many minutes: increase `runTimeoutSeconds`
- Task is only a quick read-only check: keep `runTimeoutSeconds` small
- User explicitly wants progress relayed back: add `streamTo: "parent"`
- ACP is unavailable but the task should still run in the background: explain the fallback and use `runtime: "subagent"`Related Skills
background-remover-claw-skill
Generate ai background remover images with AI via the Neta AI image generation API (free trial at neta.art/open).
background-remover
AI Background Removal - Remove background from images, create transparent PNG, one-click background remover for e-commerce product photos, portrait headshots, design materials. Supports JPG, PNG, WebP local files and remote URLs.
background-check-list
背景调查清单。触发场景:用户准备录用候选人,要求生成背调清单和背调问题模板。
---
name: article-factory-wechat
humanizer
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
find-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
tavily-search
Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.
baidu-search
Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.
agent-autonomy-kit
Stop waiting for prompts. Keep working.
Meeting Prep
Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.
self-improvement
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.
botlearn-healthcheck
botlearn-healthcheck — BotLearn autonomous health inspector for OpenClaw instances across 5 domains (hardware, config, security, skills, autonomy); triggers on system check, health report, diagnostics, or scheduled heartbeat inspection.