From 1bff5f7966488aacc8ea162f43ff7d334a01473a Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Thu, 25 Dec 2025 21:31:59 +0900 Subject: [PATCH] fix(sisyphus-agent): remove 30min timeout and add realtime output buffering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove DEFAULT_TIMEOUT_MS (set to 0) to allow CI agent runs to complete without timeout - Add stdbuf -oL -eL for unbuffered realtime output in GitHub Actions - Update timeout logic to only set timeout when value > 0 This fixes CI agent runs that were timing out after 30 minutes and not showing realtime output. 🤖 Generated with assistance of OhMyOpenCode --- .github/workflows/sisyphus-agent.yml | 2 +- src/cli/run/runner.ts | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/sisyphus-agent.yml b/.github/workflows/sisyphus-agent.yml index 7becdf5..530efe8 100644 --- a/.github/workflows/sisyphus-agent.yml +++ b/.github/workflows/sisyphus-agent.yml @@ -338,7 +338,7 @@ jobs: PROMPT="${PROMPT//BRANCH_PLACEHOLDER/$DEFAULT_BRANCH}" PROMPT="${PROMPT//COMMENT_PLACEHOLDER/$USER_COMMENT}" - bun run dist/cli/index.js run "$PROMPT" + stdbuf -oL -eL bun run dist/cli/index.js run "$PROMPT" # Push changes (as sisyphus-dev-ai) - name: Push changes diff --git a/src/cli/run/runner.ts b/src/cli/run/runner.ts index 27f27db..6bd5d03 100644 --- a/src/cli/run/runner.ts +++ b/src/cli/run/runner.ts @@ -5,7 +5,7 @@ import { checkCompletionConditions } from "./completion" import { createEventState, processEvents } from "./events" const POLL_INTERVAL_MS = 500 -const DEFAULT_TIMEOUT_MS = 30 * 60 * 1000 +const DEFAULT_TIMEOUT_MS = 0 export async function run(options: RunOptions): Promise { const { @@ -18,10 +18,15 @@ export async function run(options: RunOptions): Promise { console.log(pc.cyan("Starting opencode server...")) const abortController = new AbortController() - const timeoutId = setTimeout(() => { - console.log(pc.yellow("\nTimeout reached. Aborting...")) - abortController.abort() - }, timeout) + let timeoutId: ReturnType | null = null + + // timeout=0 means no timeout (run until completion) + if (timeout > 0) { + timeoutId = setTimeout(() => { + console.log(pc.yellow("\nTimeout reached. Aborting...")) + abortController.abort() + }, timeout) + } try { const { client, server } = await createOpencode({ @@ -29,7 +34,7 @@ export async function run(options: RunOptions): Promise { }) const cleanup = () => { - clearTimeout(timeoutId) + if (timeoutId) clearTimeout(timeoutId) server.close() } @@ -100,7 +105,7 @@ export async function run(options: RunOptions): Promise { throw err } } catch (err) { - clearTimeout(timeoutId) + if (timeoutId) clearTimeout(timeoutId) if (err instanceof Error && err.name === "AbortError") { return 130 }