Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/daemon/src/runtimes/defs/amr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ export const amrAgentDef = {
inactivityTimeoutMs: 30 * 60 * 1000,
// Once the ACP handshake has completed and session/prompt is waiting on the
// provider, transport/status heartbeats must not leave the UI in Preparing
// indefinitely. Two minutes leaves conservative provider-startup headroom
// while still bounding the user's wait and one safe same-run retry.
firstOutputTimeoutMs: 2 * 60 * 1000,
// indefinitely. 150 seconds (2.5 minutes) leaves enough provider-startup
// headroom while still bounding the user's wait and one safe same-run retry.
firstOutputTimeoutMs: 150_000,
} satisfies RuntimeAgentDef;
6 changes: 4 additions & 2 deletions apps/daemon/tests/run-retry-runtime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ describe('same-run retry runtime', () => {
delete process.env.OPEN_DESIGN_TELEMETRY_RELAY_URL;
process.env.VELA_RUNTIME_KEY = `fake-runtime-key-${randomUUID()}`;
process.env.VELA_LINK_URL = 'https://amr-link.open-design.ai/v1';
process.env.OD_CHAT_RUN_FIRST_OUTPUT_TIMEOUT_MS = '100';
// Keep both watchdog attempts fast while proving the user-facing stall text
// is derived from the configured deadline, rather than a stale literal.
process.env.OD_CHAT_RUN_FIRST_OUTPUT_TIMEOUT_MS = '1200';
process.env.OD_CHAT_RUN_INACTIVITY_TIMEOUT_MS = STALL_WATCHDOG_TIMEOUT_MS;
process.env.OD_ACP_STAGE_TIMEOUT_MS = STALL_WATCHDOG_TIMEOUT_MS;

Expand All @@ -323,7 +325,7 @@ describe('same-run retry runtime', () => {

const run = await createAndWaitForRun(started.url, 'amr');
expect(run.status).toBe('failed');
expect(run.error).toContain('without emitting a first output');
expect(run.error).toContain('Agent stalled without emitting a first output for 1s.');
expect(run.terminalTrigger).toBe('first_output_deadline');

const events = await readRunEvents(run.eventsLogPath);
Expand Down
10 changes: 5 additions & 5 deletions apps/daemon/tests/runtimes/chat-run-inactivity-timeout.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ describe('resolveChatRunFirstOutputTimeoutMs', () => {

it('uses the runtime default and lets the operator override or disable it', () => {
delete process.env[FIRST_OUTPUT_ENV_KEY];
expect(resolveChatRunFirstOutputTimeoutMs(120_000)).toBe(120_000);
expect(resolveChatRunFirstOutputTimeoutMs(150_000)).toBe(150_000);

process.env[FIRST_OUTPUT_ENV_KEY] = '90000';
expect(resolveChatRunFirstOutputTimeoutMs(120_000)).toBe(90_000);
expect(resolveChatRunFirstOutputTimeoutMs(150_000)).toBe(90_000);

process.env[FIRST_OUTPUT_ENV_KEY] = '0';
expect(resolveChatRunFirstOutputTimeoutMs(120_000)).toBe(0);
expect(resolveChatRunFirstOutputTimeoutMs(150_000)).toBe(0);
});

it('rejects an invalid checked-in runtime default', () => {
Expand All @@ -222,8 +222,8 @@ describe('amrAgentDef.inactivityTimeoutMs', () => {
expect(amrAgentDef.inactivityTimeoutMs).toBe(THIRTY_MINUTES_MS);
});

it('ships a two-minute absolute first-output deadline', () => {
expect(amrAgentDef.firstOutputTimeoutMs).toBe(120_000);
it('ships a 150-second (2.5-minute) absolute first-output deadline', () => {
expect(amrAgentDef.firstOutputTimeoutMs).toBe(150_000);
});
});

Expand Down
Loading