feat: goal-driven autopilot driver (default), keep /loop fallback (v1.7.0)#10
Open
memorysaver wants to merge 1 commit into
Open
feat: goal-driven autopilot driver (default), keep /loop fallback (v1.7.0)#10memorysaver wants to merge 1 commit into
memorysaver wants to merge 1 commit into
Conversation
….7.0)
Autopilot's real objective is goal-shaped ("complete the current layer"),
not time-shaped. Replace the fixed-interval poll loop as the *default*
driver with a goal-driven one built on the host-native `/goal` primitive
(Claude Code v2.1.139+ and Codex's experimental `goals` feature), which
re-fires a tick when there is work and self-terminates at the layer
boundary. The `/loop` driver is retained as the fallback (`--loop`),
including for unattended cron/launchd runs (`/goal` is in-session only).
Only the driver changes. The 7-step CHECK→ACT tick, the delegated cheap
CHECK, the signals protocol, the executor abstraction, and the
orchestrator boundary are all unchanged.
Key mechanics:
- Scope: one layer per goal; stops (complete or paused) at the layer gate.
- Anti-hot-loop: each tick surfaces a signals-only AUTOPILOT status line
(boundary-safe) then waits a bounded floor (default 5m, --floor) before
ending the turn — CC Monitor-with-timeout (raw sleep is blocked in a
turn), Codex shell sleep.
- Runaway bound: --max-turns (default 200) + Codex token_budget.
Decision record: docs/decisions/goal-driven-autopilot.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Autopilot's real objective is goal-shaped ("complete the current layer"), not time-shaped — the 5-minute
/loopinterval was only a polling throttle, and termination was ad-hoc. This makes the goal driver the default: it uses the host-native/goalprimitive, which re-fires a tick when there's work and self-terminates at the layer boundary. The fixed-interval/loopdriver is retained as the fallback (--loop).Only the driver changes. The 7-step CHECK→ACT tick, the delegated cheap CHECK, the signals protocol, the executor abstraction, and the orchestrator boundary are all unchanged.
Why this works on both runtimes
Both hosts ship a near-symmetric
/goal(verified live):/goal(v2.1.139+) — session-scoped condition; a Haiku evaluator judges it against the transcript after each turn; turn-driven.goals(experimental flag, CLI 0.130) — persisted thread goal with a first-classtoken_budget(soft-stops tobudget_limited); idle-driven.Design decisions (per the ADR)
/aep-reflectand re-invokes for the next layer./goalre-fires the instant a turn ends, so each tick ends by (1) surfacing a signals-onlyAUTOPILOTstatus line for the evaluator (boundary-safe — never workspace code) and (2) waiting a bounded floor (default 5m,--floor). Reliability-first: CC usesMonitorwith a hard timeout (a raw foregroundsleepis blocked in a turn), Codex uses shellsleep. Cadence is behaviorally identical to the/loop 5musers already trust — the only change is self-termination.--max-turns(default 200) + Codextoken_budget./loopretained because/goalis in-session-only and the cron/launchd unattended path needs/loop/codex exec.Changes
skills/patterns/autopilot/SKILL.md— goal driver as default; restructured start protocol into 6a (goal) / 6b (loop); step ⑦ surface+wait tail; stop/guardrails/resume updated.skills/patterns/autopilot/references/tick-protocol.md— invocation + step ⑦ goal-driver tail with the status-line format.skills/patterns/executor/references/backends.md— driver × backend matrix names both in-session variants; goal driver is in-session-only.docs/workflow/autonomous-loop.md— human-facing description.docs/decisions/goal-driven-autopilot.md— new ADR.CHANGELOG.md[1.7.0]+marketplace.json1.6.0 → 1.7.0.Test plan
Docs/skill-content change (no code). Validated:
marketplace.jsonparses; pre-commit (oxlint/oxfmt) green; no stale "recurring loop / 5-minute" phrasing left in the autopilot skill; command surface unchanged (--looprestores prior behavior exactly).🤖 Generated with Claude Code