Skip to content

Commit bebe7d1

Browse files
recuu-pfegclaude
andcommitted
fix: CLI gracefully waits when no sprint exists (setup incomplete)
Instead of crashing on sprint.number null access, poll and wait for project setup to complete. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent eeb55e6 commit bebe7d1

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/cli.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ async function runLoop(cliArgs: CliArgs, runner: AgentRunner): Promise<void> {
135135
continue;
136136
}
137137

138+
// Wait for sprint to be created (Setup not completed yet)
139+
if (!sprintData.sprint) {
140+
ui.info("No active sprint — waiting for project setup to complete...");
141+
await sleep(POLL_INTERVAL_MS);
142+
continue;
143+
}
144+
138145
// Auto-tag on sprint completion (opt-in via workspace setting or CLI flag)
139146
const sprint = sprintData.sprint as Record<string, unknown> | undefined;
140147
if (sprint?.status === "completed" && cliArgs.autoTag) {

0 commit comments

Comments
 (0)