MCPcopy
hub / github.com/openai/codex-plugin-cc / spawnDetachedTaskWorker

Function spawnDetachedTaskWorker

plugins/codex/scripts/codex-companion.mjs:671–682  ·  view source on GitHub ↗
(cwd, jobId)

Source from the content-addressed store, hash-verified

669}
670
671function spawnDetachedTaskWorker(cwd, jobId) {
672 const scriptPath = path.join(ROOT_DIR, "scripts", "codex-companion.mjs");
673 const child = spawn(process.execPath, [scriptPath, "task-worker", "--cwd", cwd, "--job-id", jobId], {
674 cwd,
675 env: process.env,
676 detached: true,
677 stdio: "ignore",
678 windowsHide: true
679 });
680 child.unref();
681 return child;
682}
683
684function enqueueBackgroundTask(cwd, job, request) {
685 const { logFile } = createTrackedProgress(job);

Callers 1

enqueueBackgroundTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected