Skip to content

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

fix(cos): run read-only app tasks in app workspace, not PortOS root

Adam Eivy222132f3620d
diff --git a/server/services/subAgentSpawner.js b/server/services/subAgentSpawner.js
index 555d748d90..4e54d6a50b 100644
--- a/server/services/subAgentSpawner.js
+++ b/server/services/subAgentSpawner.js
@@ -1413,8 +1413,9 @@ export async function spawnAgentForTask(task) {
// Determine workspace path and resolve app name
const isReadOnly = isTruthyMeta(task.metadata?.readOnly);
- // Read-only tasks run in PortOS context since they call PortOS API endpoints
- let workspacePath = task.metadata?.app && !isReadOnly
+ // App tasks always run in the app workspace, even when read-only (e.g., code review).
+ // readOnly gates git/worktree operations below, not workspace selection.
+ let workspacePath = task.metadata?.app
? await getAppWorkspace(task.metadata.app)
: ROOT_DIR;
const resolvedAppName = task.metadata?.app