Problem
The bundled coding-agent skill (SKILL.md) instructs agents to use exec with background: true for long-running coding tasks, and openclaw system event --text '...' --mode now for completion notification.
This notification path is broken:
exec background → process exits → notifyOnExit enqueues system event → triggers heartbeat
- Heartbeat runs as an isolated session with no conversation context from the parent
- The isolated session has no knowledge of what was delegated, no decision tree, no instructions to forward to a channel
- Result: completion is silently consumed by a context-free heartbeat session. Nothing reaches the user.
This is compounded by issue #29215 (heartbeat.target defaults to none) and issue #23315 (subagent completion not delivered).
What works instead
sessions_spawn with mode: "run" + sessions_yield:
sessions_spawn(task="...", mode="run", label="my-task")
sessions_yield(message="Waiting for completion...")
// Result auto-announces back to the requester session
// Agent has full context to take the next action
This delivers the result back to the session that spawned the task, with full conversation context preserved. The agent can verify the work, execute the next step in a chain, or escalate to the user — all without a broken notification pipeline.
Suggested fix
Update skills/coding-agent/SKILL.md:
- Replace the
exec background pattern with sessions_spawn + sessions_yield as the recommended approach for Claude Code tasks
- Remove or deprecate the "Auto-Notify on Completion" section that recommends
openclaw system event
- Keep
exec (non-background) for quick one-shot commands that complete immediately
Impact
Any agent using the coding-agent skill to delegate background work will never receive completion notifications. This affects the core workflow of: spawn agent → wait → get result → take next action.
Environment
- OpenClaw 2026.3.13 (stable, npm)
- macOS Darwin 24.6.0 (arm64)
- Claude Code via
claude --permission-mode bypassPermissions --print
- Confirmed:
sessions_spawn + sessions_yield works correctly on this version
- Confirmed:
exec background + openclaw system event does NOT deliver to any channel
Related issues
Problem
The bundled
coding-agentskill (SKILL.md) instructs agents to useexecwithbackground: truefor long-running coding tasks, andopenclaw system event --text '...' --mode nowfor completion notification.This notification path is broken:
exec background→ process exits →notifyOnExitenqueues system event → triggers heartbeatThis is compounded by issue #29215 (
heartbeat.targetdefaults tonone) and issue #23315 (subagent completion not delivered).What works instead
sessions_spawnwithmode: "run"+sessions_yield:This delivers the result back to the session that spawned the task, with full conversation context preserved. The agent can verify the work, execute the next step in a chain, or escalate to the user — all without a broken notification pipeline.
Suggested fix
Update
skills/coding-agent/SKILL.md:exec backgroundpattern withsessions_spawn+sessions_yieldas the recommended approach for Claude Code tasksopenclaw system eventexec(non-background) for quick one-shot commands that complete immediatelyImpact
Any agent using the coding-agent skill to delegate background work will never receive completion notifications. This affects the core workflow of: spawn agent → wait → get result → take next action.
Environment
claude --permission-mode bypassPermissions --printsessions_spawn+sessions_yieldworks correctly on this versionexec background+openclaw system eventdoes NOT deliver to any channelRelated issues