A common trusted-VM layout is one environment whose root holds several checkouts (for example root: /home/<user>/src containing LibreChat, agents and code-interpreter). With that layout:
- All work serializes. Workspace lease slots only parallelize distinct registered roots, so raising
LIBRECHAT_CODE_WORKSPACE_LEASE_SLOTS does nothing for one broad root. On one deployment with a single broad root, 10-31% of execute_command requests per day hit the 30 s WORKSPACE_QUEUE_TIMEOUT (1,775 of 5,744 on the busiest day). Agents that start background checks in parallel only queue them.
- No per-checkout setup.
setup runs at worker start with cwd at the root, and per conversation worktree only when --conversation-worktree-root is set and the sources are git repositories. actions always run with cwd forced to the root. Nothing can run a repository's own bootstrap (for LibreChat, npm run smart-reinstall) in a fresh worktree of one of the contained checkouts, so agents improvise, for example by symlinking another checkout's node_modules, which resolves workspace packages to the wrong branch.
- Credentials: with checkout routing, the broad root is not itself a repository, so actions and setup at the root get no GitHub credentials.
Environments cannot overlap, so a per-repository environment cannot sit beside the broad one.
Proposal
Allow an environment to declare repositories inside its root, each with its own setup and lease capacity. Sketch:
name: primary
root: /home/ubuntu/src
repositories:
- path: LibreChat
setup: { command: npm run smart-reinstall -- --skip-client, timeoutMs: 900000 }
- path: agents
setup: { command: npm ci, timeoutMs: 600000 }
- Each repository (and each conversation worktree created from it) is its own lease key, so work in different repositories runs in parallel up to the negotiated slot count.
setup runs once per new worktree of that repository, with cwd at the worktree and that repository's credentials.
- Alternatively, allow non-overlapping child environments under a parent root.
Acceptance
- Two commands in two different repositories of one environment run concurrently with 2 slots.
- Creating a worktree of
LibreChat runs its declared setup there, with LibreChat-scoped credentials.
- Existing single-root environment definitions keep working unchanged.
A common trusted-VM layout is one environment whose root holds several checkouts (for example
root: /home/<user>/srccontainingLibreChat,agentsandcode-interpreter). With that layout:LIBRECHAT_CODE_WORKSPACE_LEASE_SLOTSdoes nothing for one broad root. On one deployment with a single broad root, 10-31% ofexecute_commandrequests per day hit the 30 sWORKSPACE_QUEUE_TIMEOUT(1,775 of 5,744 on the busiest day). Agents that start background checks in parallel only queue them.setupruns at worker start with cwd at the root, and per conversation worktree only when--conversation-worktree-rootis set and the sources are git repositories.actionsalways run with cwd forced to the root. Nothing can run a repository's own bootstrap (for LibreChat,npm run smart-reinstall) in a fresh worktree of one of the contained checkouts, so agents improvise, for example by symlinking another checkout'snode_modules, which resolves workspace packages to the wrong branch.Environments cannot overlap, so a per-repository environment cannot sit beside the broad one.
Proposal
Allow an environment to declare repositories inside its root, each with its own setup and lease capacity. Sketch:
setupruns once per new worktree of that repository, with cwd at the worktree and that repository's credentials.Acceptance
LibreChatruns its declared setup there, with LibreChat-scoped credentials.