Repository navigation
feat: follow active goals with Claude Code - #193103
GoatInAHat wants to merge 2 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR connects active OpenClaw Goals to Claude Code’s native pursuit loop and preserves terminal Goal-tool verdicts through final-response settlement. Example: Claude Code 2.1.318 pursues the Goal “Verify the deliverable” and calls update_goal with status complete.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 4 items remain Keep this draft open: it contains distinct native Goal integration work and is paired with an unresolved issue and prerequisite PR; the supported-runtime contract needs a maintainer decision. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe admitted execution owner lends session Goal custody to the Claude plugin, which translates native pursuit and Stop events into existing Goal transactions and terminal replies. flowchart TD
A[Admitted execution] --> B[Host Goal capability]
B --> C[Claude native pursuit]
C --> D[Managed Goal tool]
D --> E[Existing session writer]
E --> F[Stop response and final settlement]
F --> G[Goal status and user reply]
Technical reviewBest possible solution: Use the existing execution and session writers for an approved, qualified Claude-native Goal contract with explicit compatibility recovery. Do we have a high-confidence way to reproduce the issue? Current-main source lacks the native Goal capability and Claude Stop integration; supplied fixtures exercise the proposed behavior, but this review ran no target code. Is this the best way to solve the issue? The implementation reuses admitted execution, Goal transitions, publication predicates, and process cleanup; the smallest coherent stage is the prerequisite handoff repair followed by this capability with its first consumer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8c411658c18b. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: Source retains live guards, but authority across native pursuit remains unqualified at final effects. EvidenceSecurity concerns:
What I checked:
PR surfaceSource +850, Tests +1320, Docs +45, Other +3. Total +2218 across 41 files. Added test files: 4. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 4, 2026, 8:31 PM ET / November 5, 2026, 01:31 UTC. |
Related: #192988. Depends on #193024.
What Problem This Solves
Active OpenClaw Goals do not drive Claude Code's native pursuit loop, and a real Goal-tool terminal verdict must stop that loop without discarding the current answer.
User Impact
An admitted Claude turn can pursue its active Goal natively while Stop, Pause, objective edits and revoked execution authority retain control. A committed complete/blocked tool verdict preserves the final reply and prevents another pursuit iteration.
This draft is not live-qualified or ready to merge. It requires Claude Code 2.1.318 or newer; exact token budgets and unrepresentable or mismatched native objectives are rejected explicitly. Durable restart recovery and Codex autonomous pursuit are separate follow-ups.
Why This Change Was Made
The existing execution owner lends a versioned Goal capability to the Claude plugin. Real managed tool calls use that same terminal transaction. Claude's native Stop callback reads the committed verdict at the transport write boundary; normal final-response and process cleanup still finish before status reconciliation.
The generic capability ships with its first working consumer. No timer, second continuation queue or provider-specific policy is added to core. The owner and its consumer stay together because splitting them would leave an unused or incomplete interface.
This branch includes the unchanged prerequisite commit from #193024. GitHub does not support native stacks across forks; the stage-only comparison isolates these changes. The prerequisite can be removed from the upstream diff after it lands.
Evidence
c0286528d78be1de21d309ae45203a31f81bbcde.Live vendor MCP transport, real native inference/Stop evaluation, final response and external cancellation still require the isolated authenticated Gateway run. Synthetic subprocess results and native-source inspection are not presented as that live proof. A full distribution build has not been run for this stage.