Skip to content

auto-claude 1.0.0: absorb goal-mode, deploy to live, self-healing watchdog - #37

Merged
unohee merged 2 commits into
mainfrom
feat/auto-claude-1.0
Nov 11, 2026
Merged

unohee merged 2 commits into
mainfrom
feat/auto-claude-1.0

Conversation

@unohee

@unohee unohee commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What

  • goal-mode merges into auto-claude. The loop lives in auto-claude/hooks/{loop,evaluator,guard}.ts. The driver starts each milestone itself, so the gate credit, goal-loop.base, /goal-mode loop on and shared/loop-protocol.jsonl are gone. goal-mode's session goals are dropped: Claude Code's /goal and ProposeGoal cover them. /goal-mode loop on becomes /auto-claude start --queue (build only).
  • Runs end live. The plan must carry Deploy:, Smoke check: and CodeQL: lines, or Deploy: none (<reason>). The driver deploys after each merge and smoke-checks it.
    • A deploy whose script has not landed yet waits.
    • A failed deploy queues a repair milestone from the default branch instead of stopping the run. 3 failures in a row stop it.
    • A committed .claude/auto-deploy.json still wins over the plan.
  • Watchdog instead of "check /auto-claude status". Six stall patterns measured in vega-agent, CC-Router, de-artifact and intrect-marketing each have a test:
    • P1: only required checks decide a PR, and a CI that never finishes is re-run once, then held.
    • P2: a refused SSH push retries over https; the same ship error goes to the model at 5 checks and is held at 10 checks and 15 min; two holds for one cause stop the run.
    • P3: a lost merge reply is looked up again.
    • P4/P5: a quiet session with an open milestone is woken at 3, 6 and 12 min, then the milestone is blocked; planning that ends without a plan is reminded 2 min later; AskUserQuestion, EnterPlanMode, ProposeGoal and set_goal are refused during a run, and a session /goal is cleared when it starts.
    • P6: the kickoff forbids leaving the deploy or release to the person.
  • harness 0.3.4 renames its references to the loop.

Deviations from the approved plan

  • .claude/goal-loop.log stays as the driver's event channel. Its cursor reader is tested, and harness watches the file. The loop writes it and the driver reads it in the same process.
  • The fetch-and-rebase remedy for a rejected push is not implemented. Repeated push errors go to the model, then are held.
  • P4 (the model handing the run back to the person) is covered by POLICY text, the 2-min planning reminder and the watchdog. The model's text is not parsed.

Verification

  • bash scripts/ci.sh passes locally on Claude Code 2.1.322: auto-claude 121, harness 165, model-tier 63, refactor 35, plus tsc and sync-shared.
  • CodeQL (javascript, security-and-quality) on auto-claude/ found 1 real defect and 1 noise item:
    • js/redos in the guard's read-only regex was real. It is replaced by a token check with a 5000-flag test case.
    • js/useless-assignment-to-local was noise, cleaned up anyway.
    • The re-run shows 0 results.
  • Real-session E2E (testing/auto_e2e_261111_v1, Claude Code 2.1.322, local CI, deploy.sh set to fail once) passed:
    • The plan had Deploy: bash deploy.sh, Smoke check and CodeQL: python, all written by the model.
    • Milestone 1 was met after one unmet check and merged.
    • The first deploy failed, and the run did not stop: it queued a repair milestone from main, which the evaluator judged met. It was merged and the deploy passed.
    • Milestone 2 was merged and deployed. The final check passed: 3 merged, 0 held, 2 deploys, about 4 minutes.
    • Not covered by E2E: a watchdog wake from a real idle session. Unit tests cover it.

Rollout

Disable goal-mode@claude-mod in ~/.claude/settings.json in the same step as scripts/deploy.sh. While it stays loaded, its own set_goal nudge and Stop hook still run.

…ing watchdog

goal-mode's loop moves into auto-claude (hooks/loop.ts, evaluator.ts,
guard.ts). The driver starts each milestone itself, so the gate credit,
goal-loop.base and the `/goal-mode loop on` hand-off are gone, along with
the stalls they caused. goal-mode's session goals are dropped in favour of
Claude Code's own /goal and ProposeGoal; `/goal-mode loop on` becomes
`/auto-claude start --queue` (build only).

The run now ends live. The plan must say how the repository deploys
(Deploy, Smoke check and CodeQL lines, or `Deploy: none (<reason>)`);
the driver deploys after each merge and smoke-checks it. A deploy whose
script has not landed yet waits, and a failed deploy queues a repair
milestone from the default branch instead of stopping the run (3 failures
in a row stop it). A committed .claude/auto-deploy.json still wins.

Stalls measured in vega-agent, CC-Router, de-artifact and intrect-marketing
are handled instead of handed to the person:
- only required checks decide a PR (a red optional check held one 16 h);
- a lost merge reply is looked up again;
- an SSH push refused goes over https; a repeating ship error goes to the
  model at 5 checks and is held at 10; a closed PR is reopened once;
- CI that never finishes is re-run once, then held; two holds for one
  cause stop the run;
- a milestone open in a quiet session is prompted again at 3, 6 and 12
  min (turn.start/turn.complete), then blocked so the run goes on;
- planning that ends without a plan is reminded 2 min later;
- AskUserQuestion, EnterPlanMode and ProposeGoal are refused during a
  run, and a session /goal is cleared when it starts;
- idle notices say what the watchdog is doing, never "check status".

A run in flight when 1.0 loads takes its open milestone over from
goal-loop.log, and new branches number above existing goal/NN-*.
harness 0.3.4 renames its references to the loop.
…evidence, plan-phase-only auto_plan_ready, token guard (CodeQL js/redos), timed holds, CI re-run waits for cancel
@unohee
unohee marked this pull request as ready for review November 11, 2026 09:32
@unohee
unohee merged commit 4bfd50e into main Nov 11, 2026
1 check passed
@unohee
unohee deleted the feat/auto-claude-1.0 branch November 11, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant