Skip to content

Commit bd58bf1

Browse files
committed
fix: reduce polling in review/retro phases (2min interval)
- Review/retrospective/completed: poll every 2min instead of 30s - Suppress "No tasks" log in idle phases
1 parent 0dd4af1 commit bd58bf1

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/cli.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,13 +473,16 @@ async function runLoop(cliArgs: CliArgs, runner: AgentRunner): Promise<void> {
473473
});
474474

475475
if (todoTasks.length === 0) {
476+
const phase = sprintData.sprint?.status ?? "unknown";
477+
const isIdle = phase === "review" || phase === "retrospective" || phase === "completed";
478+
const waitMs = isIdle ? POLL_INTERVAL_MS * 4 : POLL_INTERVAL_MS; // 2min in review, 30s in active
476479
await api.updateAgent({
477480
name: cliArgs.agentName,
478481
status: "idle",
479-
activity: "Waiting for tasks",
482+
activity: isIdle ? `Sprint ${phase}, waiting` : "Waiting for tasks",
480483
});
481-
ui.info(`No tasks — polling again in ${POLL_INTERVAL_MS / 1000}s`);
482-
await sleep(POLL_INTERVAL_MS);
484+
if (!isIdle) ui.info(`No tasks — polling again in ${waitMs / 1000}s`);
485+
await sleep(waitMs);
483486
continue;
484487
}
485488

0 commit comments

Comments
 (0)