cyberine
UsageRun recipes

Foreground run wall-clock timeout — cyberine run --timeout <sec>

--timeout <sec> adds an inline wall-clock auto-kill to foreground cyberine run invocations. If the run (workers + judge) has not finished within the given number of seconds, an abort signal is sent to every in-flight worker, the judge phase is skipped (judges make their own un-aborted LLM calls — running them defeats the timeout), and the command exits non-zero:

cyberine run --timeout 300 "<task>"    # kill after 5 min if not done; exit 1
cyberine run --timeout 60 -p "<task>"  # with --print, same abort + non-zero exit

The abort propagates via the same AbortSignal path the TUI stop button uses: the loop adapter tears down its in-flight HTTP stream, the CLI adapter sends SIGTERM then (after a 2 s grace window) SIGKILL. Partial streamed output is preserved on the in-memory result — any output produced before the kill is printed to stderr as normal worker diagnostics. The flag is only supported on foreground runs (no --bg); background runs have no inline caller to own the timer, and the reaper (cyberine reap / CYBERINE_STUCK_WALL_MS) covers that path.

Known limitation / deferred work: --timeout here and CYBERINE_CLI_TIMEOUT_MS (env vars table above, deprecated alias OPENCODE_TIMEOUT_MS) are two different knobs that are easy to conflate. --timeout is the whole-run wall clock for one cyberine run invocation (every worker + the judge together); CYBERINE_CLI_TIMEOUT_MS is the per-subprocess timeout for a single CLI worker's own process. There is no plan to merge them, and the deprecated alias is kept honoured indefinitely rather than removed on a schedule.