Skip to content

Continuous autopilot mode with hourly planning#3

Merged
gf5901 merged 1 commit into
mainfrom
feat/continuous-autopilot
Mar 21, 2026
Merged

Continuous autopilot mode with hourly planning#3
gf5901 merged 1 commit into
mainfrom
feat/continuous-autopilot

Conversation

@gf5901
Copy link
Copy Markdown
Owner

@gf5901 gf5901 commented Mar 21, 2026

Summary

  • Continuous autopilot mode: Projects can now run in continuous mode (alongside the existing daily mode). In continuous mode, the Autopilot Lambda fires hourly and auto-approves plans — no human gate per plan. A timed cycle (configurable hours) runs until the window expires, the agent is fully blocked on human tasks, or a failure circuit breaker trips, at which point the cycle pauses and notifies via Discord.
  • Plan keying: Plan sort keys changed from PLAN#YYYY-MM-DD to PLAN#YYYY-MM-DDTHH:MM:SS for continuous mode (backward-compatible — daily mode still uses date-only keys).
  • Agent pacing: The planner can return next_check_hours (1–8) to defer the next invocation when no work is needed, avoiding unnecessary Opus calls.
  • Cycle management API: New endpoints POST /cycle/start, POST /cycle/stop, POST /cycle/review for managing continuous cycles with feedback injection.
  • Frontend: Mode selector (Off/Daily/Continuous), cycle controls, review panel with feedback, recent plan chips for continuous mode.
  • SST app name fix: Config now reads SST_APP_NAME env var (defaults to agent-task-bot to match the deployed Pulumi stack).

Edge cases addressed

  • Daily mode no longer blocks regenerate requests outside 07:00 UTC
  • Lambda skips SSM trigger for continuous projects without an active cycle
  • Cycle state is cleared when switching away from continuous mode
  • Failure circuit breaker pauses the cycle after 3 consecutive high-failure plans
  • Stale cycle_started_at can't cause immediate expiry when switching back to continuous
  • Duplicate Regenerate button removed from continuous proposed view
  • cycle/stop validates continuous mode before allowing stop

Test plan

  • Python lint (ruff) passes
  • Frontend typecheck passes
  • API package typecheck + lint + tests pass
  • Lambda deployed and health check returns OK
  • Autopilot cron updated to hourly
  • Manual: toggle Off → Daily → Continuous in the UI, verify mode persists
  • Manual: start a cycle, verify plan is proposed within the hour
  • Manual: stop cycle, provide feedback, restart — verify feedback appears in next plan context

Made with Cursor

The deployed Pulumi stack uses "agent-task-bot" but sst.config.ts said
"task-forge", causing fresh deploys to fail with "Table already exists".
Default to "agent-task-bot", allow override via SST_APP_NAME env var.
Also document AutopilotPlan cron in the deploy skill.

Made-with: Cursor
@gf5901 gf5901 merged commit 8cdb6db into main Mar 21, 2026
4 checks passed
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