Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix(cos): move explicitWorktree declaration outside isReadOnly block
Adam Eivy08ba428868da
diff --git a/server/services/subAgentSpawner.js b/server/services/subAgentSpawner.jsindex e08c4fa746..2382d13857 100644--- a/server/services/subAgentSpawner.js+++ b/server/services/subAgentSpawner.js@@ -1437,6 +1437,7 @@ export async function spawnAgentForTask(task) {let jiraTicket = null;let jiraBranchName = null;let worktreeInfo = null;+ // Determine worktree usage flags upfront (needed for agent metadata even for read-only tasks)const explicitOpenPR = isTruthyMeta(task.metadata?.openPR);const explicitWorktree = isTruthyMeta(task.metadata?.useWorktree) || explicitOpenPR;@@ -1533,11 +1534,6 @@ export async function spawnAgentForTask(task) {}}- // Determine worktree usage: explicit user flags take priority, then conflict-based auto-detection.- // useWorktree: work in an isolated worktree branch- // openPR: open a PR to default branch (implies useWorktree)- // When neither is set, only create a worktree if conflict is detected with other running agents.-// Feature agent tasks: use persistent worktree instead of creating a new oneif (task.metadata?.featureAgentRun && task.metadata?.featureAgentId) {const { getFeatureAgent } = await import('./featureAgents.js');