with one click
code-agent-orchestration
// Skill for orchestrating coding agent sessions from OpenClaw. Covers launching, monitoring, plan approval, lifecycle management, and worktree decisions.
// Skill for orchestrating coding agent sessions from OpenClaw. Covers launching, monitoring, plan approval, lifecycle management, and worktree decisions.
| name | Code Agent Orchestration |
| description | Skill for orchestrating coding agent sessions from OpenClaw. Covers launching, monitoring, plan approval, lifecycle management, and worktree decisions. |
| metadata | {"openclaw":{"homepage":"https://github.com/goldmar/openclaw-code-agent","requires":{"bins":["openclaw"]},"install":[{"id":"npm","kind":"node","package":"openclaw-code-agent","label":"Install OpenClaw Code Agent (npm)"}]}} |
Use openclaw-code-agent to run Claude Code or Codex sessions as background coding jobs from chat.
channel manually. Routing comes from agentChannels, the current chat context, and fallbackChannel.agent_respond or agent_launch(..., resume_session_id=...); do not start a fresh session for the same task.name when you care about later follow-up.workdir to the target repo.permission_mode: "plan" when the user wants a real review gate before implementation.permission_mode: "bypassPermissions" only for autonomous execution.defaultWorktreeStrategy defaults to delegate, so new sessions normally use branch isolation and orchestrator-led follow-through. Use worktree_strategy: "off" only when the task must run in the main checkout or outside a git repo.plan mode, the plan belongs in normal session output. Do not ask the coding agent to write plan docs or transcript artifacts unless the user explicitly asked for a file.Example:
agent_launch(
prompt: "Fix the auth middleware bug and add tests",
name: "fix-auth",
workdir: "/home/user/projects/my-app"
)
When a session already exists for the task, keep using it.
agent_respond(session, message, approve=true) or agent_request_plan_approval(...) if delegated approval must escalate to the useragent_respond(session, message)agent_respond(session, message)agent_launch(resume_session_id=session_id, prompt="...")agent_launch is only for genuinely independent workDo not launch a new coding session from a wake event for the same task.
Use:
agent_sessions()
agent_output(session: "fix-auth", lines: 100)
agent_output(session: "fix-auth", full: true)
For worktree follow-through, inspect:
agent_worktree_status()
agent_worktree_status(session: "fix-auth")
For worktree cleanup and follow-through, use that tool's lifecycle, derived state, cleanup disposition, and retained reasons as the plugin state source. Avoid deciding cleanup safety from transcript summaries or branch names alone.
When wake payloads include these fields, use them as the plugin's recorded approval state:
requestedPermissionModeeffectivePermissionMode / currentPermissionModeapprovalExecutionStateUse those deterministic fields for approval follow-through before consulting transcript fragments.
When OpenClaw exposes managed TaskFlow state for a session, use it as a high-level progress mirror of the plugin session. For operational follow-up, check agent_sessions, agent_output, and agent_worktree_status.
Approval/execution meanings:
approved_then_implemented: normal approved executionimplemented_without_required_approval: actual approval bypassawaiting_approval: still stopped at the approval gatenot_plan_gated: no plan gate appliedCompletion ownership:
originRoute block as the source of truth for human follow-ups.originRoute differs from the current chat, do not use a normal final assistant reply for the user-facing follow-up. Use a routed send path that preserves provider, target, and threadId instead.✅ line as the status signal and your follow-up as the factual outcome summary that should usually come right after it.agent_output(..., full=true), diff context, or deterministic tool state.NO_REPLY or otherwise explicitly opted out of a user-facing follow-up summaryAuto-respond immediately only for:
Forward everything else to the user:
When forwarding, quote the session's exact question. Do not add commentary.
Use permission_mode: "plan" whenever the user wants a real planning checkpoint.
planApproval: "ask"Approve, Revise, or Reject in the same thread drives the same decision path.agent_sessions before acting.agent_respond(...).planApproval: "delegate"agent_output(session, full=true); do not rely on the truncated preview.agent_respond(..., approve=true) only when the latest actionable plan version is clearly in-bounds and low risk.approval_rationale, for example: agent_respond(session='...', message='Approved. Go ahead.', approve=true, approval_rationale='Scope matches the request and the changes are low risk.')👍 Plan approved line is only a fallback signal, not the full explanation.changes_requested, that stale state should not block approval of the latest revised plan version.agent_request_plan_approval(session='...', summary='...') exactly once so the plugin sends the single canonical user approval prompt.planApproval: "approve"Use worktrees as temporary task sandboxes, not as generic branch inventory.
Lifecycle meanings:
pending_decision: still waiting for merge / PR / dismiss follow-throughpr_open: PR exists; preserve the sandboxmerged: normal ancestry merge landedreleased: content already landed on the base branch even though SHAs differ after rebase, squash, or cherry-pickdismissed: sandbox intentionally discardedno_change: no committed deltaIf agent_worktree_status reports released, the sandbox content is already landed. Do not narrate it as "still unmerged" just because the branch appears ahead.
offaskagent_merge or agent_pr unless the user explicitly asks after that.released if its content already landed on base through another path. Confirm that with agent_worktree_status(...) before deciding what follow-up is still needed.delegateagent_merge is acceptable for low-risk, clearly scoped changes that match the task.agent_pr() autonomously in delegate flows. Escalate PR decisions to the user.manualagent_merge or agent_pr.agent_worktree_cleanup(mode: "preview_safe") to review what Clean all safe would remove.agent_worktree_cleanup(mode: "clean_safe") only when the user asked to clean up safe sandboxes.agent_worktree_cleanup(mode: "preview_all") when you need both safe candidates and retained reasons.agent_worktree_status / agent_worktree_cleanup as lifecycle data, not advisory prose.git merge or raw PR commands in place of plugin tools.agent_worktree_cleanup(session: "...", dismiss_session: true) to dismiss permanently.agent_worktree_cleanup to force-delete unresolved worktrees. The supported bulk action is "clean all safe": omit session and let the plugin remove only lifecycle-safe worktrees while preserving anything active, pending, dirty, or PR-open.ask worktree behind the user's back.multi_turn or multi_turn_disabled; all sessions are multi-turn.channel manually unless you are debugging routing.[HINT] Download the complete skill directory including SKILL.md and all related files