Summary
Simple greedy_search calls (individual engines and engine: "all" without depth: "research") have no overall wall-clock deadline. Only per-extractor runExtractor timeouts exist (src/search/engines.mjs:21-40): 60s default, 70s gemini, 80s chatgpt, 120s logically.
Problem
Total time for one tool call can exceed 2 minutes because multiple budgets stack:
engine: "all" fans out to N engines (each up to 60-80s) + source fetching after all engines finish (bin/search.mjs)
- Visible-recovery retry re-runs a blocked engine in visible mode after the headless attempt already timed out
- A single extractor's in-browser eval can hang until the CDP/nav timeout (e.g. logically burned the full ~113s on
answer-wait today)
Requested behavior
In depth: "research" mode the per-round budgets already exist (src/search/research.mjs). For simple (non-research) searches, add a hard overall ceiling — ~2 minutes — that caps the entire call (fan-out + source fetch + any visible recovery), kills in-flight extractor children, and returns a clear TimeLimitExceeded error so the caller isn't left hanging.
Constraints:
- Must still return partial results if some engines finished before the deadline (consistent with the resilient-synthesis design).
- Apply to the CLI path (
bin/search.mjs) and the Pi tool path (src/tools/greedy-search-handler.ts).
- Research mode must remain unaffected.
Summary
Simple
greedy_searchcalls (individual engines andengine: "all"withoutdepth: "research") have no overall wall-clock deadline. Only per-extractorrunExtractortimeouts exist (src/search/engines.mjs:21-40): 60s default, 70s gemini, 80s chatgpt, 120s logically.Problem
Total time for one tool call can exceed 2 minutes because multiple budgets stack:
engine: "all"fans out to N engines (each up to 60-80s) + source fetching after all engines finish (bin/search.mjs)answer-waittoday)Requested behavior
In
depth: "research"mode the per-round budgets already exist (src/search/research.mjs). For simple (non-research) searches, add a hard overall ceiling — ~2 minutes — that caps the entire call (fan-out + source fetch + any visible recovery), kills in-flight extractor children, and returns a clear TimeLimitExceeded error so the caller isn't left hanging.Constraints:
bin/search.mjs) and the Pi tool path (src/tools/greedy-search-handler.ts).