fix(sisyphus-agent): remove 30min timeout and add realtime output buffering

- 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
This commit is contained in:
YeonGyu-Kim
2025-12-25 21:31:59 +09:00
parent dacecfd3b2
commit 1bff5f7966
2 changed files with 13 additions and 8 deletions

View File

@@ -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

View File

@@ -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<number> {
const {
@@ -18,10 +18,15 @@ export async function run(options: RunOptions): Promise<number> {
console.log(pc.cyan("Starting opencode server..."))
const abortController = new AbortController()
const timeoutId = setTimeout(() => {
let timeoutId: ReturnType<typeof setTimeout> | 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<number> {
})
const cleanup = () => {
clearTimeout(timeoutId)
if (timeoutId) clearTimeout(timeoutId)
server.close()
}
@@ -100,7 +105,7 @@ export async function run(options: RunOptions): Promise<number> {
throw err
}
} catch (err) {
clearTimeout(timeoutId)
if (timeoutId) clearTimeout(timeoutId)
if (err instanceof Error && err.name === "AbortError") {
return 130
}