Skip to content

Commit 5f043ac

Browse files
committed
feat(core): handle agentic sandboxing
1 parent 6570674 commit 5f043ac

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

packages/nx/bin/nx.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,18 @@ import { performance } from 'perf_hooks';
2121
import { setupWorkspaceContext } from '../src/utils/workspace-context';
2222
import { daemonClient } from '../src/daemon/client/client';
2323
import { removeDbConnections } from '../src/utils/db-connection';
24+
import { isAiAgent } from '../src/native';
25+
26+
function handleAgenticSandbox() {
27+
const sandboxEnvVars = ['SANDBOX_RUNTIME', 'CODEX_SANDBOX', 'GEMINI_SANDBOX'];
28+
if (isAiAgent() && sandboxEnvVars.some((e) => process.env[e] !== undefined)) {
29+
process.env['NX_DAEMON'] = 'false';
30+
process.env['NX_ISOLATE_PLUGINS'] = 'false';
31+
}
32+
}
2433

2534
async function main() {
35+
handleAgenticSandbox();
2636
if (
2737
process.argv[2] !== 'report' &&
2838
process.argv[2] !== '--version' &&

0 commit comments

Comments
 (0)