Repository navigation
fix(runner): don't start a session for cards a starting session will claim - #111
Merged
Merged
Conversation
…claim A UI action (maybeAutorun) and the cron tick can start runners within seconds of each other. Each gated on the same ready card, since nobody had claimed it yet, so 3 sessions started for one card (#328-#330 on task_fa68). The gate now leaves one card per live runner that started earlier and holds no doing card yet. The earliest runner never defers, so work is never left unstarted; due routines still always start a session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 15, 2026
## [0.22.2](v0.22.1...v0.22.2) (2026-10-15) ### Bug Fixes * **runner:** don't start a session for cards a starting session will claim ([#111](#111)) ([6caba83](6caba83)), closes [#328](https://github.com/Robbertvermeulen/agentboard/issues/328) [#329](https://github.com/Robbertvermeulen/agentboard/issues/329) [#110](#110)
|
🎉 This PR is included in version 0.22.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Follow-up to #110. Right after deploying it, three sessions started for one card: at 09:28:29 two UI actions each fired
maybeAutorun()(#328, #329, triggerserve, 0.1 s apart) and at 09:28:37 the cron tick started #330. All three gated on the single ready cardtask_fa68: #110 only excludes cards already claimed by a live session, and an agent claims a few commands into its run.Change
runnersAhead(slot): live runners that took their slot earlier (slot order breaks a tie) and whose session holds no doing card yet, i.e. sessions still starting up that will claim from the same ready pool. The gate starts a session only whencards.length > ahead. The earliest runner counts nobody ahead, so work is never left unstarted; a run with due routines always starts (routines are marked per runner, so they're exclusive).New log reason:
gate covered: N cards, M sessions starting.Testing
npm run buildpasses. Isolated data dir,AGENTBOARD_MAX_SESSIONS=3, fake session that claims the first free ready card after 3 s (retrying the next one on a lost claim, per AGENT.md rule 15):gate covered: 1 cards, 1 sessions starting.work,work-slot-1,work-slot-2, each hands back only its own card.🤖 Generated with Claude Code