fix(cli): keep run_commands timeout out of session config

This commit is contained in:
Robin Newhouse
2026-05-20 17:03:06 -07:00
parent 7610471daa
commit 93a280ae68
6 changed files with 2 additions and 7 deletions
-2
View File
@@ -26,7 +26,6 @@ import {
type ClineCore,
Llms,
ProviderSettingsManager,
readGlobalSettings,
SessionSource,
} from "@cline/core";
import type { Message } from "@cline/shared";
@@ -534,7 +533,6 @@ export class AcpAgent implements Agent {
mode: session.currentMode,
defaultToolAutoApprove: false,
toolPolicies: { "*": { autoApprove: false } },
runCommandsTimeoutMs: readGlobalSettings().runCommandsTimeoutMs ?? 30000,
enableSpawnAgent: true,
enableAgentTeams: false,
enableTools: true,
-2
View File
@@ -118,7 +118,6 @@ export async function runCli(): Promise<void> {
setClineDir(configDir);
}
setHomeDir(homedir());
const { readGlobalSettings } = await import("@cline/core");
// Capture activation telemetry only after config/home directory selection
// has been applied, so the telemetry singleton's persisted distinct-id
@@ -864,7 +863,6 @@ export async function runCli(): Promise<void> {
});
const config: Config = {
runCommandsTimeoutMs: readGlobalSettings().runCommandsTimeoutMs,
providerId: provider,
modelId:
args.model ??
@@ -583,7 +583,6 @@ export async function runInteractive(
...readGlobalSettings(),
runCommandsTimeoutMs: timeoutMs,
});
config.runCommandsTimeoutMs = timeoutMs;
await sessionRuntime.ensureReady();
await sessionRuntime.restartWithCurrentMessages();
},
-1
View File
@@ -30,7 +30,6 @@ export interface Config extends Omit<CoreSessionConfig, "apiKey" | "mode"> {
mode: CliAgentMode;
defaultToolAutoApprove: boolean;
toolPolicies: Record<string, ToolPolicy>;
runCommandsTimeoutMs: number;
}
export interface ActiveCliSession {
@@ -178,6 +178,8 @@ export function createBuiltinTools(
return createDefaultTools({
...toolsConfig,
bashTimeoutMs:
toolsConfig.bashTimeoutMs ?? executorOptions.bash?.timeoutMs,
executors,
});
}
@@ -109,7 +109,6 @@ function createBuiltinToolsList(
createBuiltinTools({
cwd,
...preset,
bashTimeoutMs: runCommandsTimeoutMs,
enableSkills: !!skillsExecutor,
...toolRoutingConfig,
executorOptions: {