{"record":{"id":"3f2d6542c00893e8","repo":"musistudio/claude-code-router","slug":"profile-claude-app-bot-worker-stderr-chunk-to","errorCode":null,"errorMessage":"[profile] Claude App bot worker stderr: ${chunk.toString(\"utf8\").trim()}","messagePattern":"\\[profile\\] Claude App bot worker stderr: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"packages/core/src/profiles/launch-service.ts","lineNumber":1351,"sourceCode":"    CCR_CODEX_WORKSPACE_NAME: profile.name || profile.id,\n    CCR_PROFILE_SURFACE: \"app\",\n    CODEXL_CODEX_WORKSPACE_NAME: profile.name || profile.id,\n    CODEXL_PROFILE_SURFACE: \"app\",\n    ...claudeCodeUtcTimezoneEnvOverride()\n  };\n  delete env.ELECTRON_NO_ATTACH_CONSOLE;\n\n  const child = spawn(nodeLaunch.command, [runtimeFile, \"claude-bot-worker\", \"--workspace-name\", profile.name || profile.id], {\n    detached: false,\n    env,\n    stdio: [\"ignore\", \"ignore\", \"pipe\"],\n    windowsHide: true\n  });\n  claudeAppBotWorker = child;\n  claudeAppBotWorkerProfileId = profile.id;\n  claudeAppBotWorkerStateDir = botEnv.CCR_BOT_GATEWAY_STATE_DIR;\n  child.stderr?.on(\"data\", (chunk) => {\n    console.warn(`[profile] Claude App bot worker stderr: ${chunk.toString(\"utf8\").trim()}`);\n  });\n  child.once(\"exit\", (code, signal) => {\n    if (claudeAppBotWorker === child) {\n      claudeAppBotWorker = undefined;\n      claudeAppBotWorkerProfileId = undefined;\n      claudeAppBotWorkerStateDir = undefined;\n    }\n    if (code && code !== 0) {\n      console.warn(`[profile] Claude App bot worker exited: code=${code}${signal ? ` signal=${signal}` : \"\"}`);\n    }\n  });\n  child.once(\"error\", (error) => {\n    if (claudeAppBotWorker === child) {\n      claudeAppBotWorker = undefined;\n      claudeAppBotWorkerProfileId = undefined;\n      claudeAppBotWorkerStateDir = undefined;\n    }\n    console.warn(`[profile] Claude App bot worker failed: ${formatError(error)}`);","sourceCodeStart":1333,"sourceCodeEnd":1369,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/profiles/launch-service.ts#L1333-L1369","documentation":"Raw stderr passthrough from the spawned Claude App bot worker child process. Any text the worker writes to stderr (stack traces, deprecation notices, diagnostics) is logged verbatim. It is purely informational; the worker's lifecycle is handled by the exit/error handlers.","triggerScenarios":"The Claude App bot gateway worker (spawned with stdio stderr 'pipe' and windowsHide) writes anything to stderr — a caught exception trace inside the worker, a Node warning, or a library printing to stderr.","commonSituations":"Worker hits an unrecoverable error and prints a stack before exiting (paired with an exit event); noisy third-party dependency warnings; expected diagnostics during startup.","solutions":["Read the stderr text — it is the worker's own diagnostic, not a gateway error.","If it precedes repeated worker exits, debug the worker process itself (state dir from CCR_BOT_GATEWAY_STATE_DIR, its logs).","Suppress noisy dependency warnings via NODE_OPTIONS=--no-deprecation when spawning if they are benign.","Upgrade the app/core so the worker stops warning."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"null","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Treat stderr output as diagnostics, not gateway errors","Correlate with exit/error events before debugging","Check worker state dir logs for detail"],"tags":["child-process","stderr","bot-worker","claude"],"backgroundTag":"child-process-stderr","analyzedSha":"99f24806c6a2c660b16e53e95211c517448a6c90","analyzedAt":"2026-08-27T04:11:01.184Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}