Skip to content

Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.

gateway: a request whose agent goes while it waits for room ends its wait before giving its place back

yetone2374ffe16143
diff --git a/internal/gateway/rpm.go b/internal/gateway/rpm.go
index 4bf0eb43a..749387081 100644
--- a/internal/gateway/rpm.go
+++ b/internal/gateway/rpm.go
@@ -177,6 +177,9 @@ func (l *rpms) wait(ctx context.Context, who string, limit int, longest time.Dur
case <-c:
return d, nil
case <-ctx.Done():
+ // the wait ends before its place is given back, so once the place
+ // is back nothing is left to send it
+ stop()
l.giveBack(who, at)
return rpmNow().Sub(now), ctx.Err()
}