From 4f4952f97826d82f92904c1a85659cc6994344fa Mon Sep 17 00:00:00 2001 From: Lauren ten Hoor Date: Mon, 9 Feb 2026 23:32:47 +0800 Subject: [PATCH] feat: configure subagent cleanup interval to keep development sessions alive --- lib/setup.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/setup.ts b/lib/setup.ts index 6254b94..f8905cc 100644 --- a/lib/setup.ts +++ b/lib/setup.ts @@ -278,6 +278,7 @@ async function resolveWorkspacePath(agentId: string): Promise { /** * Write DevClaw model tier config and devClawAgentIds to openclaw.json plugins section. * Also adds tool restrictions (deny sessions_spawn) to DevClaw agents. + * Configures subagent cleanup interval to keep development sessions alive. * Read-modify-write to preserve existing config. */ async function writePluginConfig( @@ -302,6 +303,13 @@ async function writePluginConfig( // Write models config.plugins.entries.devclaw.config.models = { ...models }; + // Configure subagent cleanup interval to 30 days (43200 minutes) + // This keeps development sessions alive during active development + if (!config.agents) config.agents = {}; + if (!config.agents.defaults) config.agents.defaults = {}; + if (!config.agents.defaults.subagents) config.agents.defaults.subagents = {}; + config.agents.defaults.subagents.archiveAfterMinutes = 43200; + // Write/update devClawAgentIds if (agentId) { const existing = config.plugins.entries.devclaw.config.devClawAgentIds ?? [];