openclaw - 💡(How to fix) Fix Add native control-plane task starter for repo-backed ACP workflows [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59067Fetched 2026-04-08 02:29:08
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Root Cause

Without a native starter, assistants can drift into:

  • direct agent runs without worktrees
  • worktrees without tracked sessions
  • inconsistent startup reporting
  • partial adherence to the control plane

The native starter removes that ambiguity and turns startup into one enforceable path.

RAW_BUFFERClick to expand / collapse

Problem

DishPics now has a documented control-plane workflow for implementation tasks, but the startup path is still split awkwardly across:

  • repo-local shell prep (.claw/scripts/start-control-plane-task.sh)
  • manual/OpenClaw-tool ACP session spawn
  • manual registry update with returned session id

That means startup is still partly procedural and partly memory-dependent.

We attempted to make the shell wrapper also spawn ACP directly, but that was the wrong shape. ACP spawn is already a first-class OpenClaw capability and should not be reimplemented ad hoc in shell/client glue.

Desired outcome

Provide a native OpenClaw task starter path that can perform all of these as one canonical operation:

  1. prepare repo task state
  2. spawn ACP session in the correct worktree
  3. record the session id in the repo task registry
  4. return/report canonical startup facts

Proposed shape

Conceptual command/API:

openclaw tasks start --repo DishPics --task-id 36 --title "Fix history identity and persistence contract" --type bugfix

or an equivalent tool/helper callable from the assistant layer.

Required behavior

Phase A — prepare repo state

  • create/update structured task spec
  • create canonical branch (e.g. baomeow/[taskid] unless overridden)
  • create dedicated worktree
  • render task prompt into that worktree

Phase B — spawn ACP session natively

  • call the same ACP/runtime path used by sessions_spawn(runtime="acp")
  • pass the task prompt and worktree cwd
  • return childSessionKey / runId

Phase C — record session

  • update repo task registry with sessionId
  • mark session reachable
  • append startup notes
  • report startup facts in structured form

Structured output contract

A successfully started task should return at least:

  • taskId
  • branch
  • worktreePath
  • promptPath
  • sessionId
  • optional runId
  • status

Important guardrail

A task should not be considered truly started unless sessionId exists.

Current repo/task flows often treat worktree creation as “running”, but operationally that is incomplete. We either need:

  • a distinct prepared status, or
  • a strict invariant that running with sessionId = null is not actually started.

Why this matters

Without a native starter, assistants can drift into:

  • direct agent runs without worktrees
  • worktrees without tracked sessions
  • inconsistent startup reporting
  • partial adherence to the control plane

The native starter removes that ambiguity and turns startup into one enforceable path.

Suggested implementation direction

Short term:

  • provide a helper/command that bridges repo prep + native ACP spawn + registry update

Long term:

  • make it reusable for other repos with repo-local orchestration layers, not just DishPics

Reference

Design note written here:

  • /home/jfranz/.openclaw/workspace/products/dishpics/control-plane-starter-design.md

extent analysis

TL;DR

Implement a native OpenClaw task starter that integrates repo preparation, ACP session spawning, and registry updates into a single operation.

Guidance

  • Define a new OpenClaw command or API, such as openclaw tasks start, that takes required parameters like --repo, --task-id, --title, and --type.
  • Implement the command in three phases: prepare repo state, spawn ACP session natively, and record the session in the repo task registry.
  • Ensure the command returns structured output, including taskId, branch, worktreePath, promptPath, sessionId, and status, to provide a clear indication of task startup.
  • Enforce the invariant that a task is not considered started unless a sessionId exists, to prevent incomplete or inconsistent startup states.

Example

openclaw tasks start --repo DishPics --task-id 36 --title "Fix history identity and persistence contract" --type bugfix

This command would prepare the repo state, spawn an ACP session, and record the session in the registry, returning structured output with the required details.

Notes

The implementation should prioritize reusability across different repos and consider the long-term goal of making the starter path enforceable and consistent.

Recommendation

Apply a workaround by implementing a helper/command that bridges repo prep, native ACP spawn, and registry update, as suggested in the short-term implementation direction. This will provide a native starter path and remove ambiguity in startup operations.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING