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
refactor: drop the 85 redundant windowsHide literals the wrapper already supplies (#4315)
[._.]/ Adam Eivy39f78eb071ed
diff --git a/.changelog/next/changed-issue-4315.md b/.changelog/next/changed-issue-4315.mdnew file mode 100644index 0000000000..ac64511b7f--- /dev/null+++ b/.changelog/next/changed-issue-4315.md@@ -0,0 +1 @@+- Removed the 85 now-redundant windowsHide literals left at server spawn call sites by the earlier per-call-site sweeps — server/lib/childProcess.js already injects that value, and a guard now fails if one comes backdiff --git a/server/cos-runner/index.js b/server/cos-runner/index.jsindex 9d87a5ed58..b67870172e 100644--- a/server/cos-runner/index.js+++ b/server/cos-runner/index.js@@ -390,8 +390,7 @@ app.post('/spawn', async (req, res) => {cwd,shell: false,stdio: ['pipe', 'pipe', 'pipe'],- env: childEnv,- windowsHide: true+ env: childEnv});// Detect if stream-json format is active (Claude CLI with streaming)diff --git a/server/cos-runner/processStats.js b/server/cos-runner/processStats.jsindex b95cf1240c..fb50756e9f 100644--- a/server/cos-runner/processStats.js+++ b/server/cos-runner/processStats.js@@ -79,7 +79,7 @@ export async function getProcessStats(pid) {const psCmd = isWindows? `tasklist /FI "PID eq ${safePid}" /FO CSV /NH`: `ps -p ${safePid} -o pid=,pcpu=,rss=,state=`;- const result = await execAsync(psCmd, { windowsHide: true }).catch(() => ({ stdout: '' }));+ const result = await execAsync(psCmd).catch(() => ({ stdout: '' }));const line = result.stdout.trim();if (!line) {@@ -114,12 +114,12 @@ export async function checkProcessRunning(pid) {}if (process.platform === 'win32') {- const result = await execAsync(`tasklist /FI "PID eq ${safePid}" /FO CSV /NH`, { windowsHide: true }).catch(() => ({ stdout: '' }));+ const result = await execAsync(`tasklist /FI "PID eq ${safePid}" /FO CSV /NH`).catch(() => ({ stdout: '' }));// tasklist prints a CSV row containing the PID when the process exists;// otherwise it emits an "INFO: No tasks…" line that won't contain the PID.return result.stdout.includes(`"${safePid}"`);}- const result = await execAsync(`ps -p ${safePid} -o pid=`, { windowsHide: true }).catch(() => ({ stdout: '' }));+ const result = await execAsync(`ps -p ${safePid} -o pid=`).catch(() => ({ stdout: '' }));return result.stdout.trim() !== '';}diff --git a/server/cos-runner/processStats.test.js b/server/cos-runner/processStats.test.jsindex c75aa5e517..d122f04f2b 100644--- a/server/cos-runner/processStats.test.js+++ b/server/cos-runner/processStats.test.js@@ -44,8 +44,11 @@ describe('cos-runner processStats', () => {const loadWithMockedExec = async (stdout) => {const calls = [];vi.resetModules();+ // Variadic like node's own `exec`: the callback is the last argument, and+ // the options slot is optional. A fixed `(cmd, opts, cb)` signature ties+ // the mock to whether the caller happens to pass options at all.vi.doMock('../lib/childProcess.js', () => ({- exec: (cmd, _opts, cb) => { calls.push(cmd); cb(null, { stdout, stderr: '' }); },+ exec: (cmd, ...rest) => { calls.push(cmd); rest.at(-1)(null, { stdout, stderr: '' }); },}));vi.stubGlobal('process', { ...process, platform: 'win32' });const mod = await import('./processStats.js');@@ -91,8 +94,11 @@ describe('cos-runner processStats', () => {const loadWithMockedExec = async (stdout) => {const calls = [];vi.resetModules();+ // Variadic like node's own `exec`: the callback is the last argument, and+ // the options slot is optional. A fixed `(cmd, opts, cb)` signature ties+ // the mock to whether the caller happens to pass options at all.vi.doMock('../lib/childProcess.js', () => ({- exec: (cmd, _opts, cb) => { calls.push(cmd); cb(null, { stdout, stderr: '' }); },+ exec: (cmd, ...rest) => { calls.push(cmd); rest.at(-1)(null, { stdout, stderr: '' }); },}));vi.stubGlobal('process', { ...process, platform: 'win32' });const mod = await import('./processStats.js');diff --git a/server/lib/bashResolver.js b/server/lib/bashResolver.jsindex 541bd29fe9..e1f1cd582e 100644--- a/server/lib/bashResolver.js+++ b/server/lib/bashResolver.js@@ -54,7 +54,7 @@ function standardGitBashPaths() {function gitBashFromPath() {let gitExe = '';try {- gitExe = execFileSync('where', ['git'], { encoding: 'utf8', windowsHide: true }).split(/\r?\n/)[0].trim();+ gitExe = execFileSync('where', ['git'], { encoding: 'utf8' }).split(/\r?\n/)[0].trim();} catch {return null;}diff --git a/server/lib/bufferedSpawn.js b/server/lib/bufferedSpawn.jsindex 6e9e969575..2b703c0d6c 100644--- a/server/lib/bufferedSpawn.js+++ b/server/lib/bufferedSpawn.js@@ -238,7 +238,7 @@ export const MAX_OUTPUT_BYTES = 64 * 1024;export function killProcessTree(child, signal = 'SIGTERM', { processGroup = false } = {}) {if (IS_WIN32 && child.pid && child instanceof ChildProcess) {child.killed = true;- spawn('taskkill', ['/T', '/F', '/PID', String(child.pid)], { stdio: 'ignore', windowsHide: true })+ spawn('taskkill', ['/T', '/F', '/PID', String(child.pid)], { stdio: 'ignore' }).on('error', () => {}).unref();return;@@ -289,7 +289,6 @@ export function bufferedSpawn(cmd, args, { cwd, timeoutMs, shell } = {}) {// copy of process.env when no cwd was given, matching the previous// implicit-inherit behavior exactly.env: withSpawnCwdEnv(process.env, cwd),- windowsHide: true,shell: shell === undefined ? needsShell(cmd) : shell,});let stdout = '';diff --git a/server/lib/bufferedSpawn.test.js b/server/lib/bufferedSpawn.test.jsindex 9f4981fe75..e65927b0de 100644--- a/server/lib/bufferedSpawn.test.js+++ b/server/lib/bufferedSpawn.test.js@@ -105,7 +105,7 @@ describe('killProcessTree', () => {killProcessTree(child);expect(spawnMock).toHaveBeenCalledWith('taskkill', ['/T', '/F', '/PID', '999'],- expect.objectContaining({ stdio: 'ignore', windowsHide: true })+ expect.objectContaining({ stdio: 'ignore' }));// taskkill runs in a detached process that never touches `child` itself —// .killed must be set synchronously here so re-entrant kill/abort guards@@ -357,8 +357,9 @@ describe('bufferedSpawn — structured result', () => {success: true, code: 0, signal: null,stdout: 'out-data', stderr: 'err-data', timedOut: false,});- // cwd + windowsHide passed through; shell defaults to needsShell(cmd).- expect(spawnMock).toHaveBeenCalledWith('echo', ['hi'], expect.objectContaining({ cwd: '/tmp', windowsHide: true }));+ // cwd passed through; shell defaults to needsShell(cmd). windowsHide is the+ // wrapper's job now, so it isn't in what bufferedSpawn itself passes.+ expect(spawnMock).toHaveBeenCalledWith('echo', ['hi'], expect.objectContaining({ cwd: '/tmp' }));});it('resolves failure (not throw) on a non-zero exit', async () => {diff --git a/server/lib/childProcess.guards.test.js b/server/lib/childProcess.guards.test.jsindex 49e3e5765f..a66e7603c2 100644--- a/server/lib/childProcess.guards.test.js+++ b/server/lib/childProcess.guards.test.js@@ -102,6 +102,16 @@ const parsed = new Map(candidates.map(({ rel, raw }) => [rel, blankComments(raw)const inCallSiteTree = (rel) => CALL_SITE_TREES.some((t) => rel.startsWith(t));+// A separate pre-filter for the redundant-literal rule below. The `candidates`+// set above keys on the string `child_process`, which a file that has correctly+// moved to the wrapper no longer contains — so reusing it there would scan+// exactly the files the rule does not apply to and pass green forever.+const IMPORTS_WRAPPER = /['"][^'"]*childProcess\.js['"]/;+const wrapperImporters = allFiles+ .filter((rel) => rel !== WRAPPER && !inCallSiteTree(rel))+ .map((rel) => ({ rel, raw: readServerSource(rel) }))+ .filter(({ raw }) => IMPORTS_WRAPPER.test(raw));+describe('comment blanking', () => {// Every rule below filters through blankComments, so a stripper that blanked// too much would silently turn all of them into no-ops.@@ -170,6 +180,43 @@ describe('child_process import guard', () => {).toEqual([]);});+ it('drops the redundant windowsHide literal wherever the wrapper supplies it', () => {+ // The inverse of the rule above, and the reason #4315 existed: the v1.5.x /+ // v1.6.7 per-call-site sweeps left ~85 `windowsHide: true` literals behind,+ // and once the wrapper injects the identical value they are two competing+ // conventions in one file — the loud one being the one a newcomer copies.+ // Any callee, not just the child_process names: most spawns here are reached+ // through a promisified local alias (`execAsync`, `execFileAsync`), which is+ // exactly where several of those literals lived.+ //+ // Scoped to call ARGUMENTS, which is what leaves `processEnv.js`'s+ // `safeChildProcessOptions` alone — it authors a canonical options object+ // rather than passing one to a spawn, and states `windowsHide` on purpose.+ expect(wrapperImporters.length, 'no wrapper importers found — has the scan broken?').toBeGreaterThan(40);++ const hits = [];+ for (const { rel, raw } of wrapperImporters) {+ for (const call of callExpressions(blankComments(raw), null)) {+ if (/windowsHide\s*:\s*true/.test(call.text)) hits.push({ rel, ...call });+ }+ }++ // `names: null` matches nested calls too, so the literal inside+ // `spawn(…)` also reports the `new Promise(…)` wrapping it. Keep only the+ // innermost call holding each literal, so the list points at the fix.+ const offenders = hits+ .filter((hit) => !hits.some((inner) => (+ inner.rel === hit.rel && inner.text.length < hit.text.length && hit.text.includes(inner.text)+ )))+ .map(({ rel, line, name }) => `${rel}:${line} ${name}(…)`);++ expect(+ offenders,+ 'The wrapper already defaults windowsHide: true — drop the literal:\n' ++ offenders.map((o) => ` - ${o}`).join('\n')+ ).toEqual([]);+ });+it('keeps windowsHide on every spawn in trees that cannot import the wrapper', () => {// Per call site, not per file. A file-level "mentions windowsHide somewhere"// check is the weak form of exactly this rule: aiToolkit/runner.js alreadydiff --git a/server/lib/cliProviderRun.js b/server/lib/cliProviderRun.jsindex e795990f8f..32777b7105 100644--- a/server/lib/cliProviderRun.js+++ b/server/lib/cliProviderRun.js@@ -131,7 +131,6 @@ export function runCliProviderPrompt(args = {}) {cwd: effectiveCwd,stdio: ['pipe', 'pipe', 'pipe'],env: childEnv,- windowsHide: true,});// Single settlement gate — the timer, spawn error, and close handler alldiff --git a/server/lib/cudaCapability.js b/server/lib/cudaCapability.jsindex b8b8f73ffd..e349e93631 100644--- a/server/lib/cudaCapability.js+++ b/server/lib/cudaCapability.js@@ -86,7 +86,7 @@ export async function detectCudaGpus({ execFileImpl = execFile, timeoutMs = 8000execFileImpl('nvidia-smi',[...NVIDIA_SMI_QUERY_ARGS],- { timeout: timeoutMs, windowsHide: true },+ { timeout: timeoutMs },(err, stdout) => resolve({ err, stdout: String(stdout ?? '') }),);}).catch((err) => ({ err, stdout: '' }));diff --git a/server/lib/cudaCapability.test.js b/server/lib/cudaCapability.test.jsindex 837725f5e7..f3264431a2 100644--- a/server/lib/cudaCapability.test.js+++ b/server/lib/cudaCapability.test.js@@ -58,7 +58,7 @@ describe('detectCudaGpus', () => {expect(execFileImpl).toHaveBeenCalledWith('nvidia-smi',[...NVIDIA_SMI_QUERY_ARGS],- expect.objectContaining({ windowsHide: true }),+ expect.objectContaining({ timeout: expect.any(Number) }),expect.any(Function),);expect(result).toMatchObject({ status: 'available', maxVramGb: 40 });diff --git a/server/lib/detachedSpawn.js b/server/lib/detachedSpawn.jsindex 9b422f949e..6f32a7c21e 100644--- a/server/lib/detachedSpawn.js+++ b/server/lib/detachedSpawn.js@@ -247,7 +247,7 @@ export async function spawnDetached(bin, args = [], {// is a POSIX-only guarantee; Windows keeps its prior spawn semantics apart// from `kill`, which is replaced with a tree-kill below.if (process.platform === 'win32') {- const child = spawn(bin, args, { env: withSpawnCwdEnv(env ?? process.env, cwd), cwd, stdio: ['ignore', 'pipe', 'pipe'], windowsHide: true });+ const child = spawn(bin, args, { env: withSpawnCwdEnv(env ?? process.env, cwd), cwd, stdio: ['ignore', 'pipe', 'pipe'] });// A bare `child.kill()` terminates ONLY the runner. Windows has no process// group for the POSIX `-pid` trick `killProcessGroup` relies on, so whatever// the runner spawned (the ffmpeg mux a CUDA video runtime shells out to, a@@ -355,7 +355,6 @@ export async function spawnDetached(bin, args = [], {// Pin PWD to the spawn cwd — see withSpawnCwdEnv (#3193).env: withSpawnCwdEnv(env ?? process.env, cwd),cwd,- windowsHide: true,detached: true,stdio: 'ignore',});diff --git a/server/lib/execGit.js b/server/lib/execGit.jsindex 0018000420..18eaae1c29 100644--- a/server/lib/execGit.js+++ b/server/lib/execGit.js@@ -24,8 +24,7 @@ export function execGit(args, cwd, options = {}) {// platforms (including Windows) without a shell wrapper.const child = spawn('git', args, {cwd,- shell: false,- windowsHide: true+ shell: false});let stdout = '';diff --git a/server/lib/execGit.test.js b/server/lib/execGit.test.jsindex 017959efbf..d752c3a4d5 100644--- a/server/lib/execGit.test.js+++ b/server/lib/execGit.test.js@@ -34,8 +34,7 @@ describe('execGit', () => {await promise;expect(spawn).toHaveBeenCalledWith('git', ['status'], expect.objectContaining({cwd: '/repo',- shell: false,- windowsHide: true+ shell: false}));});diff --git a/server/lib/icloudFile.js b/server/lib/icloudFile.jsindex c2ff7a7f50..d7b4d14753 100644--- a/server/lib/icloudFile.js+++ b/server/lib/icloudFile.js@@ -324,7 +324,7 @@ export function requestMaterialization(path, options = {}) {// is still correctly refused either way.let child;try {- child = spawn('brctl', ['download', path], { detached: true, stdio: 'ignore', windowsHide: true });+ child = spawn('brctl', ['download', path], { detached: true, stdio: 'ignore' });child.unref();} catch (err) {// Nothing was reserved yet — the slot is claimed below, after a successfuldiff --git a/server/lib/memoryStats.js b/server/lib/memoryStats.jsindex 2500ef6b23..a7fb5afa01 100644--- a/server/lib/memoryStats.js+++ b/server/lib/memoryStats.js@@ -24,7 +24,7 @@ function fallback() {}async function macMemory() {- const { stdout } = await execAsync('vm_stat', { windowsHide: true, timeout: 5000 });+ const { stdout } = await execAsync('vm_stat', { timeout: 5000 });const pageSizeMatch = stdout.match(/page size of (\d+) bytes/);const pageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : 16384;diff --git a/server/lib/openFolder.js b/server/lib/openFolder.jsindex 5beeb975c8..8179a0e204 100644--- a/server/lib/openFolder.js+++ b/server/lib/openFolder.js@@ -31,7 +31,7 @@ export function openFolderInSystemExplorer(localPath) {args = [localPath];}- const child = spawn(cmd, args, { detached: true, stdio: 'ignore', windowsHide: true });+ const child = spawn(cmd, args, { detached: true, stdio: 'ignore' });child.on('error', (err) => {console.error(`❌ openFolderInSystemExplorer spawn failed (${cmd}): ${err.message}`);});diff --git a/server/lib/planIds.js b/server/lib/planIds.jsindex b43d17de88..57074f91ce 100644--- a/server/lib/planIds.js+++ b/server/lib/planIds.js@@ -234,8 +234,7 @@ export function listOpenPullRequestHeadRefs(repoPath) {return new Promise(resolve => {const child = spawn('gh', ['pr', 'list', '--state', 'open', '--json', 'headRefName', '-q', '.[].headRefName'], {cwd: repoPath,- shell: false,- windowsHide: true+ shell: false});let out = '';let settled = false;diff --git a/server/lib/platform.js b/server/lib/platform.jsindex 43b2f6816e..acb547bab0 100644--- a/server/lib/platform.js+++ b/server/lib/platform.js@@ -91,7 +91,7 @@ function portProbeFor(targetPlatform) {export async function getListeningPorts({ platform: targetPlatform = platform, exec: run = execAsync } = {}) {const command = portProbeFor(targetPlatform);try {- const { stdout } = await run(command, { windowsHide: true });+ const { stdout } = await run(command);return parseListeningPorts(stdout, targetPlatform);} catch (cause) {const error = new Error(`Unable to discover listening ports with ${command}: ${cause.message}`);diff --git a/server/lib/platform.test.js b/server/lib/platform.test.jsindex c0d01adda5..09ee008aed 100644--- a/server/lib/platform.test.js+++ b/server/lib/platform.test.js@@ -44,7 +44,7 @@ describe('platform module', () => {.mockRejectedValueOnce(new Error('ss: command not found'))await expect(getListeningPorts({ platform: 'linux', exec })).resolves.toEqual([6000])- expect(exec).toHaveBeenCalledWith('ss -lntp', { windowsHide: true })+ expect(exec).toHaveBeenCalledWith('ss -lntp')await expect(getListeningPorts({ platform: 'linux', exec })).rejects.toMatchObject({code: 'PORT_DISCOVERY_FAILED',command: 'ss -lntp',diff --git a/server/lib/testHelper.js b/server/lib/testHelper.jsindex 2a65e363c6..42323d9fdc 100644--- a/server/lib/testHelper.js+++ b/server/lib/testHelper.js@@ -313,7 +313,7 @@ export function resolveTestPython() {return candidates.find((candidate) => {try {- execFileSync(candidate, ['-c', 'pass'], { stdio: 'ignore', windowsHide: true });+ execFileSync(candidate, ['-c', 'pass'], { stdio: 'ignore' });return true;} catch {return false;diff --git a/server/routes/apps/launch.js b/server/routes/apps/launch.jsindex 47593d9948..a5cc0e25a7 100644--- a/server/routes/apps/launch.js+++ b/server/routes/apps/launch.js@@ -28,7 +28,6 @@ function spawnDetached(cmd, args, options = {}) {const child = spawn(cmd, args, {detached: true,stdio: 'ignore',- windowsHide: true,...options});child.on('error', (err) => console.error(`❌ Failed to launch '${cmd}': ${err.message}`));diff --git a/server/routes/database.js b/server/routes/database.jsindex 3be7d62a1a..03a0067d09 100644--- a/server/routes/database.js+++ b/server/routes/database.js@@ -25,7 +25,7 @@ const router = Router();*/function runCmd(cmd, args, timeout = 120_000, env = process.env) {return new Promise((resolve) => {- execFile(cmd, args, { cwd: rootDir, timeout, env, windowsHide: true }, (err, stdout, stderr) => {+ execFile(cmd, args, { cwd: rootDir, timeout, env }, (err, stdout, stderr) => {const exitCode = err ? (typeof err.code === 'number' ? err.code : 1) : 0;if (exitCode !== 0) {const detail = stripAnsi(stderr || stdout || err.message || '').replace(/\s+/g, ' ').trim();@@ -321,7 +321,7 @@ export function importDumpFile(dumpFile, port, env, timeout = 120_000) {const psql = spawn('psql', ['-h', 'localhost', '-p', String(port), '-U', pgUser, '-d', pgDb,'-v', 'ON_ERROR_STOP=1', '--single-transaction'- ], { cwd: rootDir, env, windowsHide: true });+ ], { cwd: rootDir, env });// The dump read stream — declared up front so finish() can tear it down. If// psql exits early (ON_ERROR_STOP rollback) or the timeout SIGKILLs it, thediff --git a/server/routes/detect.js b/server/routes/detect.jsindex 2ff89b7e7c..4230ee9f2d 100644--- a/server/routes/detect.js+++ b/server/routes/detect.js@@ -190,7 +190,7 @@ router.post('/port', asyncHandler(async (req, res) => {? `lsof -i :${safePort} -P -n | grep LISTEN`: `ss -lntp | grep :${safePort}`;- const { stdout } = await execAsync(command, { windowsHide: true }).catch(() => ({ stdout: '' }));+ const { stdout } = await execAsync(command).catch(() => ({ stdout: '' }));if (stdout.trim()) {result.inUse = true;diff --git a/server/routes/scaffold.js b/server/routes/scaffold.jsindex b0b1cb8e4d..bdb9c7861f 100644--- a/server/routes/scaffold.js+++ b/server/routes/scaffold.js@@ -436,7 +436,7 @@ module.exports = {// Run npm install (skip for Xcode projects — no npm)if (template !== 'ios-native' && template !== 'xcode-multiplatform') {const installCmd = template === 'portos-stack' ? 'npm run install:all' : 'npm install';- const { stderr: installErr } = await execAsync(installCmd, { cwd: repoPath, windowsHide: true })+ const { stderr: installErr } = await execAsync(installCmd, { cwd: repoPath }).catch(err => ({ stderr: err.message }));if (installErr && !installErr.includes('npm warn')) {@@ -447,7 +447,7 @@ module.exports = {}// Initialize git- await execAsync('git init', { cwd: repoPath, windowsHide: true });+ await execAsync('git init', { cwd: repoPath });// Create .gitignorelet gitignoreContent;@@ -510,7 +510,7 @@ Thumbs.dbawait writeFile(join(repoPath, '.gitignore'), gitignoreContent);// Use spawn with shell:false to avoid shell injectionconst spawnGit = (args) => new Promise((resolve, reject) => {- const proc = spawn('git', args, { cwd: repoPath, shell: false, windowsHide: true });+ const proc = spawn('git', args, { cwd: repoPath, shell: false });let stderr = '';proc.stderr.on('data', (chunk) => { stderr += chunk.toString(); });proc.on('close', (code) => code === 0 ? resolve() : reject(new Error(`git ${args[0]} failed: ${stderr.trim()}`)));@@ -527,7 +527,7 @@ Thumbs.dbconst ghArgs = ['repo', 'create', repoName, '--source=.', '--push', '--private'];const { stderr: ghErr } = await new Promise((resolve) => {- const child = spawn('gh', ghArgs, { cwd: repoPath, shell: false, windowsHide: true });+ const child = spawn('gh', ghArgs, { cwd: repoPath, shell: false });let stderr = '';child.stderr.on('data', (data) => { stderr += data.toString(); });child.on('close', () => resolve({ stderr }));diff --git a/server/routes/scaffoldIOS.js b/server/routes/scaffoldIOS.jsindex 2261a8e820..5c3faa8f14 100644--- a/server/routes/scaffoldIOS.js+++ b/server/routes/scaffoldIOS.js@@ -309,7 +309,7 @@ echo "🧹 Cleaned build artifacts"`;await writeFile(join(repoPath, 'deploy.sh'), deployScript);// Make deploy.sh executable- await execAsync(`chmod +x "${join(repoPath, 'deploy.sh')}"`, { windowsHide: true });+ await execAsync(`chmod +x "${join(repoPath, 'deploy.sh')}"`);// CLAUDE.mdawait writeFile(join(repoPath, 'CLAUDE.md'), `# ${name}@@ -353,7 +353,7 @@ Requires \`.env\` file with App Store Connect API credentials (see \`.env.exampladdStep('Create iOS project', 'done');// Run xcodegen if available- const { stderr: xgenErr } = await execAsync('xcodegen generate', { cwd: repoPath, windowsHide: true })+ const { stderr: xgenErr } = await execAsync('xcodegen generate', { cwd: repoPath }).catch(err => ({ stderr: err.message }));if (xgenErr && !xgenErr.includes('Created project')) {diff --git a/server/routes/scaffoldVite.js b/server/routes/scaffoldVite.jsindex 0a076c76ec..62e2b81f64 100644--- a/server/routes/scaffoldVite.js+++ b/server/routes/scaffoldVite.js@@ -20,8 +20,7 @@ export async function scaffoldVite({ repoPath, dirName, parentDir, template, uiPconst { stderr } = await new Promise((resolve) => {const child = spawn('npm', ['create', 'vite@latest', dirName, '--', '--template', 'react'], {cwd: parentDir,- shell: process.platform === 'win32',- windowsHide: true+ shell: process.platform === 'win32'});let stderr = '';child.stderr.on('data', (data) => { stderr += data.toString(); });diff --git a/server/routes/scaffoldXcode.js b/server/routes/scaffoldXcode.jsindex 5aad451f9a..54c8708faf 100644--- a/server/routes/scaffoldXcode.js+++ b/server/routes/scaffoldXcode.js@@ -447,7 +447,7 @@ Screenshots are saved to \`screenshots/{locale}/{device}/\` for upload to App StaddStep('Create multi-platform Xcode project', 'done');// Run xcodegen if available- const { stderr: xgenErr } = await execAsync('xcodegen generate', { cwd: repoPath, windowsHide: true })+ const { stderr: xgenErr } = await execAsync('xcodegen generate', { cwd: repoPath }).catch(err => ({ stderr: err.message }));if (xgenErr && !xgenErr.includes('Created project')) {diff --git a/server/services/agentCliSpawning.js b/server/services/agentCliSpawning.jsindex ff8086d327..37b1045e44 100644--- a/server/services/agentCliSpawning.js+++ b/server/services/agentCliSpawning.js@@ -385,7 +385,6 @@ export async function spawnDirectly({cwd,shell: false,stdio: ['pipe', 'pipe', 'pipe'],- windowsHide: true,env: childEnv});diff --git a/server/services/agentManagement.js b/server/services/agentManagement.jsindex 6eec6ceb9a..8a6eb38143 100644--- a/server/services/agentManagement.js+++ b/server/services/agentManagement.js@@ -666,7 +666,7 @@ export async function getAgentProcessStats(agentId) {const psCmd = process.platform === 'win32'? `tasklist /FI "PID eq ${agent.pid}" /FO CSV /NH`: `ps -p ${agent.pid} -o pid=,pcpu=,rss=,state=`;- const result = await execAsync(psCmd, { windowsHide: true }).catch(() => ({ stdout: '' }));+ const result = await execAsync(psCmd).catch(() => ({ stdout: '' }));const line = result.stdout.trim();if (!line) {diff --git a/server/services/agentTuiSpawning.js b/server/services/agentTuiSpawning.jsindex 8cb4c8848d..8ca7fbeeb9 100644--- a/server/services/agentTuiSpawning.js+++ b/server/services/agentTuiSpawning.js@@ -231,7 +231,7 @@ function shellHasLiveChild(shellPid) {return new Promise((resolve) => {// `-Ao ppid=` is POSIX (all processes, ppid column only, no header) and// works on both macOS (BSD ps) and Linux (procps).- execFile('ps', ['-Ao', 'ppid='], { timeout: 2000, windowsHide: true }, (err, stdout) => {+ execFile('ps', ['-Ao', 'ppid='], { timeout: 2000 }, (err, stdout) => {if (err) { resolve(true); return; }resolve(stdout.split('\n').some((line) => parseInt(line, 10) === shellPid));});diff --git a/server/services/agents.js b/server/services/agents.jsindex 3161405669..540bddddcb 100644--- a/server/services/agents.js+++ b/server/services/agents.js@@ -128,7 +128,7 @@ async function findUnixProcesses(pattern) {// Security: Pattern is validated above to only contain safe charactersconst cmd = `ps -ww -eo pid,ppid,%cpu,%mem,etime,command | grep -i "${safePattern}" | grep -v grep`;- const result = await execAsync(cmd, { maxBuffer: 10 * 1024 * 1024, windowsHide: true }).catch(() => ({ stdout: '' }));+ const result = await execAsync(cmd, { maxBuffer: 10 * 1024 * 1024 }).catch(() => ({ stdout: '' }));const lines = result.stdout.trim().split('\n').filter(Boolean);const processes = [];@@ -203,7 +203,7 @@ async function findWindowsProcesses(pattern) {const result = await execFileAsync('powershell',['-NoProfile', '-NonInteractive', '-Command', script],- { windowsHide: true, maxBuffer: 8 * 1024 * 1024 },+ { maxBuffer: 8 * 1024 * 1024 },).catch((err) => {// Keep the empty-result behavior (the caller treats [] as "none running"),// but never again fail SILENTLY — a broken process probe is why this was@@ -351,9 +351,9 @@ export async function killProcess(pid) {const platform = process.platform;if (platform === 'win32') {- await execAsync(`taskkill /PID ${safePid} /F`, { windowsHide: true });+ await execAsync(`taskkill /PID ${safePid} /F`);} else {- await execAsync(`kill -9 ${safePid}`, { windowsHide: true });+ await execAsync(`kill -9 ${safePid}`);}console.log(`🔪 Killed process ${safePid}`);@@ -374,7 +374,7 @@ export async function getProcessInfo(pid) {if (platform === 'darwin' || platform === 'linux') {const cmd = `ps -ww -p ${safePid} -o pid,ppid,%cpu,%mem,etime,command`;- const result = await execAsync(cmd, { windowsHide: true }).catch(() => null);+ const result = await execAsync(cmd).catch(() => null);if (!result) return null;const lines = result.stdout.trim().split('\n');diff --git a/server/services/appDeployer.js b/server/services/appDeployer.jsindex 1fb251746b..596cc89b00 100644--- a/server/services/appDeployer.js+++ b/server/services/appDeployer.js@@ -69,7 +69,6 @@ export function deployApp(app, flags, emit) {const child = spawn(resolveBashBinary(), ['deploy.sh', ...safeFlags], {cwd: dir,shell: false,- windowsHide: true,env: { ...process.env, FORCE_COLOR: '0' }});diff --git a/server/services/askService.js b/server/services/askService.jsindex 00fd01aa58..b30eb47ce4 100644--- a/server/services/askService.js+++ b/server/services/askService.js@@ -624,7 +624,6 @@ async function* streamCompletion(provider, model, prompt, signal) {env: childEnv,stdio: ['pipe', 'pipe', 'pipe'],shell: false,- windowsHide: true,});// Single settlement gate — the timer, the abort listener, and the closediff --git a/server/services/autonomousJobs/execution.js b/server/services/autonomousJobs/execution.jsindex 97624a162d..d722929052 100644--- a/server/services/autonomousJobs/execution.js+++ b/server/services/autonomousJobs/execution.js@@ -87,8 +87,7 @@ async function executeShellJob(job) {const child = spawn(spawnCommand, spawnArgs, {cwd: PATHS.root,env: childEnv,- shell: false,- windowsHide: true+ shell: false})const timer = setTimeout(() => {diff --git a/server/services/autonomousJobs/execution.shellSpawn.test.js b/server/services/autonomousJobs/execution.shellSpawn.test.jsindex 4af8891531..84dcc0d247 100644--- a/server/services/autonomousJobs/execution.shellSpawn.test.js+++ b/server/services/autonomousJobs/execution.shellSpawn.test.js@@ -52,7 +52,6 @@ describe('executeShellJob — Windows CLI shim resolution', () => {await executeShellJob({ id: 'job-1', name: 'System Health Check', command: 'pm2 jlist' })const [, , opts] = spawnMock.mock.calls[0]expect(opts.shell).toBe(false)- expect(opts.windowsHide).toBe(true)})it('resolves the command against the CHILD env, not process.env', async () => {diff --git a/server/services/autonomousJobs/scriptHandlers.js b/server/services/autonomousJobs/scriptHandlers.jsindex b09fd7b595..ae80442e64 100644--- a/server/services/autonomousJobs/scriptHandlers.js+++ b/server/services/autonomousJobs/scriptHandlers.js@@ -29,7 +29,6 @@ function runMoltworldExploration() {const child = spawn('node', [scriptPath, durationMinutes], {stdio: ['ignore', 'pipe', 'pipe'],env: { ...process.env },- windowsHide: true,})const output = []diff --git a/server/services/autonomousJobs/selfDiagnostics.js b/server/services/autonomousJobs/selfDiagnostics.jsindex 24ace2dac7..d0e3ca6115 100644--- a/server/services/autonomousJobs/selfDiagnostics.js+++ b/server/services/autonomousJobs/selfDiagnostics.js@@ -159,7 +159,6 @@ function runCli(cmd, args, options = {}) {// caller (mirrors layeredIntelligence/runCli.js, which has the same shape).const child = spawn(cmd, args, {shell: false,- windowsHide: true,...options,env: withSpawnCwdEnv(options.env ?? process.env, options.cwd),})diff --git a/server/services/backup.js b/server/services/backup.jsindex 58dc840e5c..0e6cd3aab9 100644--- a/server/services/backup.js+++ b/server/services/backup.js@@ -125,7 +125,7 @@ export function resolveRsyncBinary(env = process.env) {function runRsync(srcDir, destDir, flags = []) {return new Promise((resolve, reject) => {const args = ['--archive', '--itemize-changes', ...flags, srcDir + '/', destDir];- const proc = spawn(resolveRsyncBinary(), args, { shell: false, windowsHide: true });+ const proc = spawn(resolveRsyncBinary(), args, { shell: false });const changed = [];let stderr = '';@@ -342,7 +342,6 @@ export async function dumpPostgres(outputPath) {'-f', outputPath], {shell: false,- windowsHide: true,env: { ...process.env, PGPASSWORD: process.env.PGPASSWORD || 'portos' }});@@ -593,7 +592,7 @@ export async function restorePostgres(destPath, snapshotId, { dryRun = true } ='-v', 'ON_ERROR_STOP=1','--single-transaction','-h', pgHost, '-p', pgPort, '-U', pgUser, '-d', pgDb, '-f', sqlPath- ], { shell: false, windowsHide: true, env: { ...process.env, PGPASSWORD: process.env.PGPASSWORD || 'portos' } });+ ], { shell: false, env: { ...process.env, PGPASSWORD: process.env.PGPASSWORD || 'portos' } });let stderr = '';proc.stderr.on('data', (chunk) => { stderr += chunk.toString(); });diff --git a/server/services/backup.test.js b/server/services/backup.test.jsindex 13b952a7a8..596f73b5f1 100644--- a/server/services/backup.test.js+++ b/server/services/backup.test.js@@ -837,7 +837,7 @@ describe('restoreSnapshot subdirFilter guard', () => {expect(spawn).toHaveBeenCalledWith('/custom/bin/rsync',expect.arrayContaining(['--archive', '--itemize-changes', '--dry-run']),- { shell: false, windowsHide: true },+ { shell: false },);} finally {if (previous === undefined) delete process.env.PORTOS_RSYNC;@@ -858,7 +858,7 @@ describe('restoreSnapshot subdirFilter guard', () => {await restore;expect(spawn.mock.calls[0][0]).toBe('rsync');- expect(spawn.mock.calls[0][2]).toEqual({ shell: false, windowsHide: true });+ expect(spawn.mock.calls[0][2]).toEqual({ shell: false });} finally {if (previous === undefined) delete process.env.PORTOS_RSYNC;else process.env.PORTOS_RSYNC = previous;@@ -1238,7 +1238,7 @@ describe('runBackup lifecycle', () => {// --- rsync invocation -------------------------------------------------const [bin, args, opts] = spawn.mock.calls[0];expect(bin).toBe('rsync');- expect(opts).toEqual({ shell: false, windowsHide: true });+ expect(opts).toEqual({ shell: false });expect(args.slice(0, 2)).toEqual(['--archive', '--itemize-changes']);// Source is PATHS.data with a trailing slash (copy contents, not the dir);// destination is the snapshot's data/ subdir.diff --git a/server/services/claudeCodeUsage.js b/server/services/claudeCodeUsage.jsindex f57d1086cf..c74102c57d 100644--- a/server/services/claudeCodeUsage.js+++ b/server/services/claudeCodeUsage.js@@ -217,7 +217,7 @@ function runUsageCli() {return new Promise((resolve, reject) => {const tz = systemTimeZone();const env = tz ? { ...process.env, TZ: tz } : process.env;- const child = spawn(CLI_COMMAND, CLI_ARGS, { stdio: ['pipe', 'pipe', 'pipe'], env, windowsHide: true });+ const child = spawn(CLI_COMMAND, CLI_ARGS, { stdio: ['pipe', 'pipe', 'pipe'], env });let stdout = '';let stderr = '';let settled = false;diff --git a/server/services/commands.js b/server/services/commands.jsindex 339b49103e..97d313dad4 100644--- a/server/services/commands.js+++ b/server/services/commands.js@@ -46,8 +46,7 @@ export function executeCommand(command, workspacePath, onData, onComplete) {const child = spawn(baseCommand, args, {cwd: commandCwd,env: withSpawnCwdEnv(safeChildProcessEnv({ FORCE_COLOR: '1' }), commandCwd),- shell: false,- windowsHide: true+ shell: false});activeCommands.set(commandId, child);diff --git a/server/services/dataManager.js b/server/services/dataManager.jsindex 298ea9c23c..1d5ca71217 100644--- a/server/services/dataManager.js+++ b/server/services/dataManager.js@@ -168,10 +168,10 @@ const SAFE_NAME = /^[a-z0-9_-]+$/;async function getDirSizeAndCount(dirPath) {if (!existsSync(dirPath)) return { size: 0, fileCount: 0 };const [duOut, findOut] = await Promise.all([- execFileAsync('du', ['-sk', dirPath], { windowsHide: true, timeout: 30000 })+ execFileAsync('du', ['-sk', dirPath], { timeout: 30000 }).then(r => r.stdout.trim()).catch(() => '0'),- execFileAsync('find', [dirPath, '-type', 'f'], { windowsHide: true, timeout: 30000 })+ execFileAsync('find', [dirPath, '-type', 'f'], { timeout: 30000 }).then(r => r.stdout.trim().split('\n').filter(Boolean).length).catch(() => 0)]);@@ -277,7 +277,7 @@ export async function archiveCategory(categoryKey, options = {}) {// Write file list to temp file to avoid shell argument limitsconst listPath = join(backupDir, `.filelist-${Date.now()}.txt`);await fsWriteFile(listPath, oldFiles.join('\n'));- await execFileAsync('tar', ['-czf', archivePath, '-C', dirPath, '-T', listPath], { timeout: 120000, windowsHide: true });+ await execFileAsync('tar', ['-czf', archivePath, '-C', dirPath, '-T', listPath], { timeout: 120000 });await rm(listPath).catch(() => {});for (const f of oldFiles) {@@ -289,7 +289,7 @@ export async function archiveCategory(categoryKey, options = {}) {}// Generic: archive entire category contents- await execFileAsync('tar', ['-czf', archivePath, '-C', DATA_DIR, categoryKey], { timeout: 120000, windowsHide: true });+ await execFileAsync('tar', ['-czf', archivePath, '-C', DATA_DIR, categoryKey], { timeout: 120000 });const archiveStat = await stat(archivePath).catch(() => null);return {diff --git a/server/services/git.js b/server/services/git.jsindex a2a5143066..ea1af26a21 100644--- a/server/services/git.js+++ b/server/services/git.js@@ -308,7 +308,7 @@ export async function checkout(dir, branchName) {function spawnCli(cmd, args, options = {}) {return new Promise((resolve) => {- const child = spawn(cmd, args, { shell: false, windowsHide: true, ...options });+ const child = spawn(cmd, args, { shell: false, ...options });let stdout = '', stderr = '';child.stdout.on('data', (d) => { stdout += d.toString(); });child.stderr.on('data', (d) => { stderr += d.toString(); });@@ -437,7 +437,7 @@ export async function createPR(dir, { title, body, base, head }) {const meta = { cli, account, owner, host };return new Promise((resolve) => {- const child = spawn(cli, args, { cwd: dir, env, shell: false, windowsHide: true });+ const child = spawn(cli, args, { cwd: dir, env, shell: false });let stdout = '';let stderr = '';@@ -481,7 +481,7 @@ export async function mergePR(dir, prNumber) {return new Promise((resolve) => {const child = spawn('gh', ['pr', 'merge', String(prNumber), '--merge', '--delete-branch'], {- cwd: dir, env, shell: false, windowsHide: true+ cwd: dir, env, shell: false});let stderr = '';child.stderr.on('data', (data) => { stderr += data.toString(); });@@ -540,7 +540,7 @@ export async function requestCopilotReview(dir, prUrl) {);return new Promise((resolve) => {- const child = spawn(cli, args, { cwd: dir, env, shell: false, windowsHide: true });+ const child = spawn(cli, args, { cwd: dir, env, shell: false });let stderr = '';child.stderr.on('data', (data) => { stderr += data.toString(); });child.on('close', (code) => {diff --git a/server/services/github.js b/server/services/github.jsindex 5fd73d007a..6e14d889bd 100644--- a/server/services/github.js+++ b/server/services/github.js@@ -51,7 +51,6 @@ export function execGh(args, timeoutMs = DEFAULT_EXEC_GH_TIMEOUT_MS, { cwd = nulconst baseEnv = env || process.env;const child = spawn('gh', args, {shell: false,- windowsHide: true,...(cwd ? { cwd, env: withSpawnCwdEnv(baseEnv, cwd) } : (env ? { env } : {}))});let stdout = '';@@ -260,8 +259,7 @@ export async function syncSecretToRepos(name) {function syncOneSecret(name, value, fullName) {return new Promise((resolve) => {const child = spawn('gh', ['secret', 'set', name, '--repo', fullName], {- shell: false,- windowsHide: true+ shell: false});let stderr = '';child.stderr.on('data', (d) => { stderr += d.toString(); });@@ -448,7 +446,7 @@ function probeGh(timeoutMs, hostname) {// targets github.com regardless of cwd, so an enterprise repo would be// gated on a host it never talks to.const args = hostname ? ['api', 'rate_limit', '--hostname', hostname] : ['api', 'rate_limit'];- const child = spawn('gh', args, { shell: false, windowsHide: true });+ const child = spawn('gh', args, { shell: false });let stderr = '';let settled = false;const done = (result) => { if (!settled) { settled = true; clearTimeout(timer); resolve(result); } };diff --git a/server/services/githubCloner.js b/server/services/githubCloner.jsindex 12fc8e750b..e58df834ad 100644--- a/server/services/githubCloner.js+++ b/server/services/githubCloner.js@@ -84,8 +84,7 @@ export async function cloneRepo(url, options = {}) {return new Promise((resolve, reject) => {const child = spawn('git', args, {env: process.env,- shell: false,- windowsHide: true+ shell: false});let stderr = '';@@ -136,8 +135,7 @@ export async function pullRepo(localPath) {const child = spawn('git', ['pull', '--ff-only'], {cwd: localPath,env: process.env,- shell: false,- windowsHide: true+ shell: false});let stdout = '';@@ -183,8 +181,7 @@ export async function getRepoInfo(localPath) {const child = spawn('git', ['log', '-1', '--format=%H|%s|%ci'], {cwd: localPath,env: process.env,- shell: false,- windowsHide: true+ shell: false});let stdout = '';diff --git a/server/services/gitlab.js b/server/services/gitlab.jsindex bfe38749d0..11bb9e5f8d 100644--- a/server/services/gitlab.js+++ b/server/services/gitlab.js@@ -23,7 +23,7 @@ const DEFAULT_EXEC_GLAB_TIMEOUT_MS = 60000;*/export function execGlab(args, cwd, timeoutMs = DEFAULT_EXEC_GLAB_TIMEOUT_MS) {return new Promise((resolve) => {- const child = spawn('glab', args, { cwd, shell: false, windowsHide: true });+ const child = spawn('glab', args, { cwd, shell: false });let stdout = '';let settled = false;// One settle path so the timeout can't resolve a promise `close` alreadydiff --git a/server/services/imageGen/agy.js b/server/services/imageGen/agy.jsindex 7e6bdfa828..dd153ccac6 100644--- a/server/services/imageGen/agy.js+++ b/server/services/imageGen/agy.js@@ -110,7 +110,7 @@ export function listModels({ agyPath } = {}) {const bin = agyPath || DEFAULT_BIN;const { command, args } = prepareCliSpawn(bin, ['models']);return new Promise((resolve) => {- const proc = spawn(command, args, { shell: false, stdio: ['pipe', 'pipe', 'pipe'], windowsHide: true });+ const proc = spawn(command, args, { shell: false, stdio: ['pipe', 'pipe', 'pipe'] });let stdout = '';let stderr = '';let settled = false;@@ -312,7 +312,7 @@ async function runAgy(job, jobId, bin, args, {// Pin PWD to the spawn cwd — see withSpawnCwdEnv (#3193). agy reads// process.cwd(), so this is defensive rather than a live fix; it keeps every// scratch-dir spawn telling the child one consistent story about where it is.- const proc = spawn(command, spawnArgs, { cwd: scratchDir, env: withSpawnCwdEnv(process.env, scratchDir), shell: false, stdio: ['ignore', 'pipe', 'pipe'], windowsHide: true });+ const proc = spawn(command, spawnArgs, { cwd: scratchDir, env: withSpawnCwdEnv(process.env, scratchDir), shell: false, stdio: ['ignore', 'pipe', 'pipe'] });activeProcs.set(jobId, proc);const removeScratch = () => rm(scratchDir, { recursive: true, force: true }).catch(() => {});let stdoutTail = '';diff --git a/server/services/imageGen/codex.js b/server/services/imageGen/codex.jsindex 0e80c07ae0..55c74ea813 100644--- a/server/services/imageGen/codex.js+++ b/server/services/imageGen/codex.js@@ -121,7 +121,7 @@ export async function checkConnection({ codexPath } = {}) {// (which would consume the user's Codex quota); the settings UI just wants// "yes the binary exists and is reachable".const bin = codexPath || DEFAULT_BIN;- const proc = spawn(bin, ['--version'], { shell: false, stdio: ['ignore', 'pipe', 'pipe'], windowsHide: true });+ const proc = spawn(bin, ['--version'], { shell: false, stdio: ['ignore', 'pipe', 'pipe'] });let out = '';proc.stdout.on('data', (c) => { out += c.toString(); });proc.stderr.on('data', (c) => { out += c.toString(); });@@ -305,7 +305,7 @@ export const noImageReason = (stdoutTail = '') => buildNoImageReason(stdoutTail,});async function runCodex(job, jobId, bin, args, outputPath, filename, meta, { cleanC2PA = false, denoise = false } = {}) {- const proc = spawn(bin, args, { shell: false, stdio: ['ignore', 'pipe', 'pipe'], windowsHide: true });+ const proc = spawn(bin, args, { shell: false, stdio: ['ignore', 'pipe', 'pipe'] });activeProcs.set(jobId, proc);let sessionId = null;diff --git a/server/services/imageGen/grok.js b/server/services/imageGen/grok.jsindex 0834a91469..816060a0ab 100644--- a/server/services/imageGen/grok.js+++ b/server/services/imageGen/grok.js@@ -313,7 +313,7 @@ async function runGrok(job, jobId, bin, args, {// Pin PWD to the spawn cwd — see withSpawnCwdEnv (#3193). grok reads// process.cwd(), so this is defensive rather than a live fix; it keeps every// scratch-dir spawn telling the child one consistent story about where it is.- const proc = spawn(spawnBin, spawnArgs, { cwd: scratchDir, env: withSpawnCwdEnv(process.env, scratchDir), shell: false, stdio: [useStdin ? 'pipe' : 'ignore', 'pipe', 'pipe'], windowsHide: true });+ const proc = spawn(spawnBin, spawnArgs, { cwd: scratchDir, env: withSpawnCwdEnv(process.env, scratchDir), shell: false, stdio: [useStdin ? 'pipe' : 'ignore', 'pipe', 'pipe'] });activeProcs.set(jobId, proc);const removeScratch = () => rm(scratchDir, { recursive: true, force: true }).catch(() => {});diff --git a/server/services/layeredIntelligence/runCli.js b/server/services/layeredIntelligence/runCli.jsindex 9999a4f4b5..0929f4311a 100644--- a/server/services/layeredIntelligence/runCli.js+++ b/server/services/layeredIntelligence/runCli.js@@ -15,7 +15,6 @@ export function runCli(cmd, args, options = {}) {// every caller's behalf rather than each one remembering it.const child = spawn(cmd, args, {shell: false,- windowsHide: true,...options,env: withSpawnCwdEnv(options.env ?? process.env, options.cwd),});diff --git a/server/services/localLlm.js b/server/services/localLlm.jsindex 11b71188b8..274155643b 100644--- a/server/services/localLlm.js+++ b/server/services/localLlm.js@@ -224,7 +224,7 @@ const manager = (backend) => (backend === 'ollama' ? ollamaManager : lmStudioMan*/function runStreaming(cmd, args, onLine, timeoutMs = 0) {return new Promise((resolve) => {- const child = spawn(cmd, args, { stdio: ['ignore', 'pipe', 'pipe'], windowsHide: true })+ const child = spawn(cmd, args, { stdio: ['ignore', 'pipe', 'pipe'] })let buffer = ''let settled = falseconst tail = [] // recent non-empty lines, capped by char budget for the error messagediff --git a/server/services/loraTraining/displayPower.js b/server/services/loraTraining/displayPower.jsindex 7015ea9fdc..1f8c1c47e4 100644--- a/server/services/loraTraining/displayPower.js+++ b/server/services/loraTraining/displayPower.js@@ -30,7 +30,7 @@ export function isDisplaySleepEnabled(settings) {// can't block or outlive its purpose; errors are swallowed (telemetry-grade,// never fatal to a training run).function runPowerCmd(cmd, args) {- const proc = spawn(cmd, args, { stdio: 'ignore', windowsHide: true });+ const proc = spawn(cmd, args, { stdio: 'ignore' });proc.on('error', () => {}); // command missing / not permitted → ignoreproc.unref();return proc;diff --git a/server/services/loraTraining/index.js b/server/services/loraTraining/index.jsindex 48255c9e80..ba630524c6 100644--- a/server/services/loraTraining/index.js+++ b/server/services/loraTraining/index.js@@ -682,7 +682,7 @@ export async function runTraining({ jobId, runId, pythonPath = null, resumeCheck// protection doesn't wait on the OS idle timeout. Best-effort — caffeinate// exits with the child.if (platform() === 'darwin' && proc.pid) {- const caf = spawn('caffeinate', ['-is', '-w', String(proc.pid)], { stdio: 'ignore', windowsHide: true });+ const caf = spawn('caffeinate', ['-is', '-w', String(proc.pid)], { stdio: 'ignore' });caf.on('error', () => {});caf.unref();}diff --git a/server/services/ollamaManager.js b/server/services/ollamaManager.jsindex 6c68fd5b48..37fcd5f34e 100644--- a/server/services/ollamaManager.js+++ b/server/services/ollamaManager.js@@ -243,7 +243,6 @@ async function startServer() {const child = spawn('ollama', ['serve'], {detached: true,stdio: ['ignore', 'ignore', 'pipe'],- windowsHide: true,env: process.env})rememberManagedProcess(child)diff --git a/server/services/perpetualWork.js b/server/services/perpetualWork.jsindex 4425514387..12becfcec3 100644--- a/server/services/perpetualWork.js+++ b/server/services/perpetualWork.js@@ -56,7 +56,7 @@ export const WORK_ITEM_LIMIT = 50;function runCli(cmd, args, cwd) {return new Promise((resolve) => {let stdout = '', stderr = '', settled = false;- const child = spawn(cmd, args, { cwd, shell: false, windowsHide: true });+ const child = spawn(cmd, args, { cwd, shell: false });const done = (result) => { if (!settled) { settled = true; clearTimeout(timer); resolve(result); } };child.stdout.on('data', (d) => { stdout += d.toString(); });child.stderr.on('data', (d) => { stderr += d.toString(); });diff --git a/server/services/pm2Standardizer.js b/server/services/pm2Standardizer.jsindex 605b395a81..100367240b 100644--- a/server/services/pm2Standardizer.js+++ b/server/services/pm2Standardizer.js@@ -452,7 +452,7 @@ export async function createGitBackup(repoPath) {}// Refuse to overwrite uncommitted changes- const { stdout: statusOut } = await execAsync('git status --porcelain', { cwd: repoPath, windowsHide: true });+ const { stdout: statusOut } = await execAsync('git status --porcelain', { cwd: repoPath });if (statusOut.trim()) {return { success: false, code: 'DIRTY_WORKTREE', reason: 'Working tree has uncommitted changes — commit or discard them before standardizing' };}@@ -463,7 +463,7 @@ export async function createGitBackup(repoPath) {// Create backup branch from current HEAD (captures committed state without stashing)// Use spawn with shell:false to avoid shell injection via branch nameawait new Promise((resolve, reject) => {- const proc = spawn('git', ['branch', branch], { cwd: repoPath, shell: false, windowsHide: true });+ const proc = spawn('git', ['branch', branch], { cwd: repoPath, shell: false });let stderr = '';proc.stderr.on('data', (chunk) => { stderr += chunk.toString(); });proc.on('close', (code) => code === 0 ? resolve() : reject(new Error(`git branch failed: ${stderr.trim()}`)));diff --git a/server/services/runner.js b/server/services/runner.jsindex 32e568e8d8..70e8b79d69 100644--- a/server/services/runner.js+++ b/server/services/runner.js@@ -303,8 +303,7 @@ export async function executeCliRun({ runId, provider, prompt, workspacePath, onchildProcess = spawn(spawnCommand, spawnArgs, {cwd: effectiveCwd,- env: childEnv,- windowsHide: true+ env: childEnv});// Pass prompt via stdin to avoid OS argv limits. When grok is delivered via adiff --git a/server/services/updateExecutor.js b/server/services/updateExecutor.jsindex f8d925ffbb..938f9e5656 100644--- a/server/services/updateExecutor.js+++ b/server/services/updateExecutor.js@@ -89,7 +89,6 @@ export async function executeUpdate(tag, emit, { forceCleanWorkspaces } = {}) {? spawn(cmd, args, {detached: true,stdio: ['ignore', 'pipe', 'pipe'],- windowsHide: true,cwd: PATHS.root,env: childEnv})diff --git a/server/services/videoGen/grok.js b/server/services/videoGen/grok.jsindex 00ee9d0a23..19af0d8473 100644--- a/server/services/videoGen/grok.js+++ b/server/services/videoGen/grok.js@@ -200,7 +200,7 @@ async function runGrokVideo(job, jobId, bin, args, {// Pin PWD to the spawn cwd — see withSpawnCwdEnv (#3193). grok reads// process.cwd(), so this is defensive rather than a live fix; it keeps every// scratch-dir spawn telling the child one consistent story about where it is.- const proc = spawn(spawnBin, spawnArgs, { cwd: scratchDir, env: withSpawnCwdEnv(process.env, scratchDir), shell: false, stdio: [useStdin ? 'pipe' : 'ignore', 'pipe', 'pipe'], windowsHide: true });+ const proc = spawn(spawnBin, spawnArgs, { cwd: scratchDir, env: withSpawnCwdEnv(process.env, scratchDir), shell: false, stdio: [useStdin ? 'pipe' : 'ignore', 'pipe', 'pipe'] });activeProcs.set(jobId, proc);const removeScratch = () => rm(scratchDir, { recursive: true, force: true }).catch(() => {});// The route stages a multipart source image into data/uploads and hands usdiff --git a/server/services/visionCli.js b/server/services/visionCli.jsindex be30f0c357..75050f7e29 100644--- a/server/services/visionCli.js+++ b/server/services/visionCli.js@@ -243,7 +243,6 @@ async function runCliVisionSpawn({ provider, model, invocation, timeout, spawnImconst child = spawnImpl(spawnCommand, spawnArgs, {cwd,env: childEnv,- windowsHide: true,stdio: ['pipe', 'pipe', 'pipe'],});let out = '';