fix(pi-claude-cli): bump inactivity timeout from 180s to 300s
Sonnet 4.6 with extended thinking on the triage prompt (~40k chars + AGENTS.md + skills) can take >3 minutes between thinking deltas. The 180s inactivity timeout was killing those subprocesses before they could finish PROMPT.md + fn_review_spec, leaving triage looping into the fallback model. Bump to 5 minutes. Test mock timings updated to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1292,7 +1292,7 @@ describe("streamViaCli", () => {
|
||||
});
|
||||
|
||||
describe("inactivity timeout", () => {
|
||||
it("kills subprocess and pushes error after 180s of no output", async () => {
|
||||
it("kills subprocess and pushes error after 300s of no output", async () => {
|
||||
const model = mockModels[0] as any;
|
||||
const context = {
|
||||
messages: [{ role: "user", content: "Hello" }],
|
||||
@@ -1303,8 +1303,8 @@ describe("streamViaCli", () => {
|
||||
|
||||
const proc = (spawn as any).mock.results[0].value;
|
||||
|
||||
// Advance timers by 180 seconds without writing to stdout
|
||||
await vi.advanceTimersByTimeAsync(180_000);
|
||||
// Advance timers by 300 seconds without writing to stdout
|
||||
await vi.advanceTimersByTimeAsync(300_000);
|
||||
|
||||
const mockStream = MockAssistantMessageEventStream.mock.instances[0];
|
||||
const doneEvent = mockStream._events.find(
|
||||
@@ -1330,8 +1330,8 @@ describe("streamViaCli", () => {
|
||||
|
||||
const proc = (spawn as any).mock.results[0].value;
|
||||
|
||||
// Advance to 170s then write a line
|
||||
await vi.advanceTimersByTimeAsync(170_000);
|
||||
// Advance to 290s then write a line (just under the 300s cap)
|
||||
await vi.advanceTimersByTimeAsync(290_000);
|
||||
|
||||
// Write a stream event line
|
||||
proc.stdout.write(
|
||||
@@ -1345,8 +1345,8 @@ describe("streamViaCli", () => {
|
||||
);
|
||||
await vi.advanceTimersByTimeAsync(0);
|
||||
|
||||
// Advance another 170s (340s total, 170s since last line) -- should NOT timeout
|
||||
await vi.advanceTimersByTimeAsync(170_000);
|
||||
// Advance another 290s (580s total, 290s since last line) -- should NOT timeout
|
||||
await vi.advanceTimersByTimeAsync(290_000);
|
||||
|
||||
const mockStream = MockAssistantMessageEventStream.mock.instances[0];
|
||||
const doneEvent = mockStream._events.find(
|
||||
@@ -1354,7 +1354,7 @@ describe("streamViaCli", () => {
|
||||
);
|
||||
expect(doneEvent).toBeUndefined();
|
||||
|
||||
// Advance 10 more seconds (180s since last line) -- NOW should timeout
|
||||
// Advance 10 more seconds (300s since last line) -- NOW should timeout
|
||||
await vi.advanceTimersByTimeAsync(10_000);
|
||||
|
||||
const doneEvent2 = mockStream._events.find(
|
||||
@@ -1401,7 +1401,7 @@ describe("streamViaCli", () => {
|
||||
await vi.advanceTimersByTimeAsync(100);
|
||||
|
||||
// Advance past 180s -- should NOT timeout since result was received
|
||||
await vi.advanceTimersByTimeAsync(180_000);
|
||||
await vi.advanceTimersByTimeAsync(300_000);
|
||||
|
||||
const mockStream = MockAssistantMessageEventStream.mock.instances[0];
|
||||
const errorEvents = mockStream._events.filter(
|
||||
|
||||
Reference in New Issue
Block a user