Skip to content

docs(skills): make coding-agent completion parent-owned#74308

Closed
Marvinthebored wants to merge 1 commit into
openclaw:mainfrom
Marvinthebored:fix-coding-agent-completion-contract
Closed

docs(skills): make coding-agent completion parent-owned#74308
Marvinthebored wants to merge 1 commit into
openclaw:mainfrom
Marvinthebored:fix-coding-agent-completion-contract

Conversation

@Marvinthebored

Copy link
Copy Markdown
Contributor

Summary

Update the coding-agent skill so background CLI workers report completion through stdout and the parent assistant owns user-facing completion/failure reporting.

The previous skill wording required delegated workers to call openclaw message send themselves. That is fragile because workers may run in sandboxed or constrained environments, may not have channel/plugin runtime access, and can complete the coding task successfully while the external notification path hangs or fails.

Changes

  • Remove the requirement for workers to self-notify with openclaw message send.
  • Keep the existing execution guidance:
    • all coding-agent runs start with background:true
    • Codex/Pi/OpenCode use pty:true
    • Claude Code uses --print --permission-mode bypassPermissions without PTY
  • Add parent-owned completion workflow:
    • capture returned sessionId
    • rely on automatic completion wake where available
    • inspect logs/status with process log/poll
    • parent reports completion/failure to the user
  • Add a CODING_AGENT_RESULT_START / CODING_AGENT_RESULT_END stdout result block template.
  • Add guidance not to pass channel/account/reply routing details into worker prompts unless the user explicitly asks the worker to interact externally.

Why

A CLI coding agent should behave like a background process with structured stdout, not like a messaging client. Parent-owned reporting avoids duplicating channel credentials/routing into worker prompts and prevents completed work from disappearing when worker-side external messaging fails.

Validation

  • git diff --check
  • Grep confirmed remaining openclaw message send references are only in “do not require/use” guidance.

@openclaw-barnacle openclaw-barnacle Bot added size: S triage: low-signal-docs Candidate: docs-only change looks low signal; maintainer review needed. labels Apr 29, 2026
@greptile-apps

greptile-apps Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates skills/coding-agent/SKILL.md to replace the worker-owned openclaw message send completion pattern with a parent-owned model: workers print a structured CODING_AGENT_RESULT_START/END block to stdout, and the parent assistant reads it via process action:log to compose the user-facing report.

Confidence Score: 4/5

Documentation-only change; safe to merge with the minor template inconsistency addressed.

Only P2 findings — a minor inconsistency in placeholder quoting between the canonical CODING_AGENT_RESULT block template and the embedded Quick Start example. No logic, security, or correctness issues.

skills/coding-agent/SKILL.md — template quoting inconsistency in the CODING_AGENT_RESULT block.

Prompt To Fix All With AI
This is a comment left during a code review.
Path: skills/coding-agent/SKILL.md
Line: 116-121

Comment:
**Template inconsistency between fenced block and embedded Quick Start**

The canonical template (lines 116–121) uses quoted placeholder values — `"not run: <reason>"` and `"none"` — but the embedded version in the Quick Start bash command (lines 143–148) drops the quotes: `not run: reason` / `none`. Workers that follow one variant will produce output in a different format from workers following the other, which could complicate log parsing with `CODING_AGENT_RESULT_START/END`.

Consider normalizing both locations to the simpler unquoted style used in the Quick Start.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "docs(skills): make coding-agent completi..." | Re-trigger Greptile

Comment on lines +116 to +121
tests: <commands run and results, or "not run: <reason>">
changed_files:
- <path>: <brief change>
blockers:
- <blocker or "none">
CODING_AGENT_RESULT_END

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Template inconsistency between fenced block and embedded Quick Start

The canonical template (lines 116–121) uses quoted placeholder values — "not run: <reason>" and "none" — but the embedded version in the Quick Start bash command (lines 143–148) drops the quotes: not run: reason / none. Workers that follow one variant will produce output in a different format from workers following the other, which could complicate log parsing with CODING_AGENT_RESULT_START/END.

Consider normalizing both locations to the simpler unquoted style used in the Quick Start.

Prompt To Fix With AI
This is a comment left during a code review.
Path: skills/coding-agent/SKILL.md
Line: 116-121

Comment:
**Template inconsistency between fenced block and embedded Quick Start**

The canonical template (lines 116–121) uses quoted placeholder values — `"not run: <reason>"` and `"none"` — but the embedded version in the Quick Start bash command (lines 143–148) drops the quotes: `not run: reason` / `none`. Workers that follow one variant will produce output in a different format from workers following the other, which could complicate log parsing with `CODING_AGENT_RESULT_START/END`.

Consider normalizing both locations to the simpler unquoted style used in the Quick Start.

How can I resolve this? If you propose a fix, please make it concise.

@clawsweeper

clawsweeper Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes:

This PR rewrites skills/coding-agent/SKILL.md so background coding-agent workers print a structured stdout result block while the parent assistant captures the sessionId, inspects process logs/status, and reports completion or failure itself.

Maintainer follow-up before merge:

Review this as a focused maintainer docs/product-contract PR: either accept the parent-owned completion model in skills/coding-agent/SKILL.md with the stdout result block and no routine routing details in worker prompts, or keep the current direct-send model and close the PR with that explicit policy decision. If accepted, docs-only validation such as git diff --check is the appropriate floor.

Best possible solution:

Review this as a focused maintainer docs/product-contract PR: either accept the parent-owned completion model in skills/coding-agent/SKILL.md with the stdout result block and no routine routing details in worker prompts, or keep the current direct-send model and close the PR with that explicit policy decision. If accepted, docs-only validation such as git diff --check is the appropriate floor.

What I checked:

  • Current skill requires worker self-notification: Current main says the completion notification must use openclaw message send, not system event/heartbeat, and tells the parent to require the worker to notify the user directly when it finishes. (skills/coding-agent/SKILL.md:3, d30ba5351ed1)
  • Mandatory pattern conflicts with the PR intent: The current mandatory pattern captures channel/account/reply routing, injects it into the worker prompt, and requires the worker to call openclaw message send on completion; there is no CODING_AGENT_RESULT stdout block on main. (skills/coding-agent/SKILL.md:91, d30ba5351ed1)
  • PR diff is focused on the docs contract: The submitted diff only changes skills/coding-agent/SKILL.md, replacing notification-route injection with sessionId capture, process log/poll inspection, and a CODING_AGENT_RESULT_START / CODING_AGENT_RESULT_END final stdout block. (skills/coding-agent/SKILL.md:1, e73c399b87a3)
  • Relevant docs support reviewing the completion model carefully: Background task docs describe terminal task notification as push-driven, with direct delivery or session-queued delivery plus immediate heartbeat wake; that supports the PR's premise but does not mean the coding-agent skill on main already implements the proposed parent-owned flow. Public docs: docs/automation/tasks.md. (docs/automation/tasks.md:162, d30ba5351ed1)
  • Security and supply-chain pass: The PR changes one bundled skill markdown file and does not touch workflows, package metadata, lockfiles, external action refs, installer scripts, dependencies, or generated/vendor code. The security-relevant effect is prompt-routing guidance: it removes routine channel/account/reply IDs from worker prompts unless explicitly needed. (skills/coding-agent/SKILL.md:1, e73c399b87a3)
  • Feature history: git log --follow and git blame show the current bundled coding-agent skill, including the direct openclaw message send completion requirement, was added on main by commit e1fd27f. (skills/coding-agent/SKILL.md:1, e1fd27fb24ae)

Likely related people:

  • steipete: git log --follow and line blame show commit e1fd27f added skills/coding-agent/SKILL.md and the current direct openclaw message send completion guidance. (role: introduced behavior / current-main owner; confidence: high; commits: e1fd27fb24ae; files: skills/coding-agent/SKILL.md)

Remaining risk / open question:

  • The PR is docs-only, but it changes the operational contract for a bundled skill. A maintainer should confirm parent-owned completion is the desired policy for low-level background bash workers and that the automatic wake/watchdog wording matches runtime behavior.

Codex review notes: model gpt-5.5, reasoning high; reviewed against d30ba5351ed1.

@vincentkoc vincentkoc self-assigned this Apr 29, 2026
@vincentkoc

Copy link
Copy Markdown
Member

Thanks for the skill-docs update. Closing this as low-signal process-doc churn without a maintainer-owned workflow change; please resubmit with a concrete current workflow gap if this still needs to change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: S triage: low-signal-docs Candidate: docs-only change looks low signal; maintainer review needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants