镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(agents): skip scheduled agents of archived projects - #464

Open
ixjosemi wants to merge 2 commits into
theam:mainfrom
ixjosemi:fix/archived-project-schedules
Open

ixjosemi wants to merge 2 commits into
theam:mainfrom
ixjosemi:fix/archived-project-schedules

Conversation

@ixjosemi

Copy link
Copy Markdown

What changes

The scheduler only picks up due schedules whose project is active. Schedules of an archived project stay in the table untouched (next_run_at doesn't move), so they would resume if the project became active again.

Why

Fixes #463. Archived projects kept running their scheduled agents, which woke workspaces and spent budget. GitHub triggers already skip archived projects. This makes schedules behave the same way.

Verification

  • Added does not run due schedules of an archived project to agent-automation.integration.test.ts. On main it fails with scheduled: 1. With the fix it passes, and the schedule row is left unclaimed.

  • pnpm --filter @facility/api test passes against the local Postgres from docker-compose.dev.yml.

  • pnpm verify passes locally

  • Behaviour verified beyond the test suite: the test fails on main and passes with the fix

  • Documentation updated, or no user-facing change (no doc describes archive vs. schedules)

🤖 Generated with Claude Code

ixjosemi and others added 2 commits October 19, 2026 11:36
The scheduler synced only active projects but claimed every due schedule,
so archiving a project kept waking its workspaces and spending budget on
each cron occurrence. Filter due schedules by project status, as GitHub
triggers already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

Archived projects keep running their scheduled agents

1 participant