docs: correct idle timeout comments for question tools

This commit is contained in:
Ivanko1608
2026-10-25 03:11:31 +04:00
parent 0b77ede6ff
commit 6112bd9ae6
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -1,7 +1,8 @@
export type LiveProcess = { toolCallIds: string[]; kill(): void }; export type LiveProcess = { toolCallIds: string[]; kill(): void };
// pi runs a message's tools (each capped at 30s by tool-execute) and calls back well within this; // Tools usually call back within seconds, but a question tool holds its call until the learner
// it stays under MCP_TOOL_TIMEOUT so an orphaned process is killed before the CLI gives up on its own. // answers. Past this, the process is killed and the answer starts a fresh one with a full replay.
// It stays under MCP_TOOL_TIMEOUT so the process is killed before the CLI gives up on its own.
export const LIVE_PROCESS_IDLE_TIMEOUT_MS = 10 * 60_000; export const LIVE_PROCESS_IDLE_TIMEOUT_MS = 10 * 60_000;
/** Test seam (runner.ts's pdfModelOverride idiom). */ /** Test seam (runner.ts's pdfModelOverride idiom). */
+3 -2
View File
@@ -36,8 +36,9 @@ type RunClaudeOptions = { cwd: string; env: NodeJS.ProcessEnv };
export type RunClaude = (args: string[], options: RunClaudeOptions) => ChildProcessWithoutNullStreams | null; export type RunClaude = (args: string[], options: RunClaudeOptions) => ChildProcessWithoutNullStreams | null;
// A held MCP call lasts until pi has run every tool of the message (each capped at 30s by // A held MCP call lasts until pi calls back with the tool result, which for a question tool is
// tool-execute) and called back; this must outlast that so the CLI never times out first. // whenever the learner answers; this must outlast the live-process idle timeout so the CLI never
// times out first.
const MCP_TOOL_TIMEOUT_MS = 30 * 60_000; const MCP_TOOL_TIMEOUT_MS = 30 * 60_000;
const PRIVATE_FILE_MODE = 0o600; const PRIVATE_FILE_MODE = 0o600;