Skip to content

The open-source app everyone uses to manage agents at work

fix(codex-local): raise default output-inactivity timeout to 30m (#9699)

Dotta9a92124c63c1
diff --git a/packages/adapters/codex-local/src/index.ts b/packages/adapters/codex-local/src/index.ts
index 8b25aa5343..77db7a8af2 100644
--- a/packages/adapters/codex-local/src/index.ts
+++ b/packages/adapters/codex-local/src/index.ts
@@ -95,7 +95,7 @@ Core fields:
Operational fields:
- timeoutSec (number, optional): run timeout in seconds
- graceSec (number, optional): SIGTERM grace period in seconds
-- outputInactivityTimeoutMs (number | null, optional): inactivity monitor around the codex child. Resets whenever the child emits stdout or stderr bytes, including non-JSON progress from long-running verification commands. Defaults to 7 * 60_000 ms when unset or non-positive. Set to \`null\` to disable the monitor entirely (only do this for known-slow tasks; the platform-level 1h silent-run safety net still applies). On fire, the adapter sends SIGTERM to the process group, waits 5s, then SIGKILL, and surfaces the run as failed with errorMessage "monitor: no codex output for {N}m {S}s".
+- outputInactivityTimeoutMs (number | null, optional): inactivity monitor around the codex child. Resets whenever the child emits stdout or stderr bytes, including non-JSON progress from long-running verification commands. Defaults to 30 * 60_000 ms when unset or non-positive. Set to \`null\` to disable the monitor entirely (only do this for known-slow tasks; the platform-level 1h silent-run safety net still applies). On fire, the adapter sends SIGTERM to the process group, waits 5s, then SIGKILL, and surfaces the run as failed with errorMessage "monitor: no codex output for {N}m {S}s".
- agentCommand (string, optional): ACP server command override used only when engine="acp"; defaults to the package-local codex-acp binary
- mode (string, optional): ACP session mode when engine="acp"; persistent or oneshot
- nonInteractivePermissions (string, optional): ACP non-interactive permission fallback when engine="acp"; deny or fail
diff --git a/packages/adapters/codex-local/src/server/output-inactivity-monitor.test.ts b/packages/adapters/codex-local/src/server/output-inactivity-monitor.test.ts
index 71c25df94e..5bf64ad901 100644
--- a/packages/adapters/codex-local/src/server/output-inactivity-monitor.test.ts
+++ b/packages/adapters/codex-local/src/server/output-inactivity-monitor.test.ts
@@ -51,6 +51,10 @@ class FakeClock {
}
describe("resolveCodexInactivityTimeout", () => {
+ it("defaults to 30 minutes", () => {
+ expect(DEFAULT_CODEX_OUTPUT_INACTIVITY_TIMEOUT_MS).toBe(30 * 60 * 1000);
+ });
+
it("uses default when value is unset", () => {
expect(resolveCodexInactivityTimeout(undefined)).toEqual({
mode: "default",
diff --git a/packages/adapters/codex-local/src/server/output-inactivity-monitor.ts b/packages/adapters/codex-local/src/server/output-inactivity-monitor.ts
index 814e06d94d..e1e0ca2f2f 100644
--- a/packages/adapters/codex-local/src/server/output-inactivity-monitor.ts
+++ b/packages/adapters/codex-local/src/server/output-inactivity-monitor.ts
@@ -1,6 +1,6 @@
import { parseJson } from "@paperclipai/adapter-utils/server-utils";
-export const DEFAULT_CODEX_OUTPUT_INACTIVITY_TIMEOUT_MS = 7 * 60 * 1000;
+export const DEFAULT_CODEX_OUTPUT_INACTIVITY_TIMEOUT_MS = 30 * 60 * 1000;
export const CODEX_OUTPUT_INACTIVITY_MONITOR_SIGTERM_GRACE_MS = 5_000;
export type CodexOutputInactivityMonitorResolution =
@@ -13,9 +13,9 @@ export type CodexOutputInactivityMonitorResolution =
* Resolve the inactivity monitor timeout from raw adapter config.
*
* - `null` → disabled (explicit escape hatch).
- * - missing/`undefined` → default 7m.
+ * - missing/`undefined` → default 30m.
* - number > 0 → configured value.
- * - number ≤ 0 → default 7m (and a `non_positive` note for logging).
+ * - number ≤ 0 → default 30m (and a `non_positive` note for logging).
*/
export function resolveCodexInactivityTimeout(rawValue: unknown): CodexOutputInactivityMonitorResolution {
if (rawValue === null) return { mode: "disabled", reason: "explicit_null" };