musistudio/claude-code-router · info
[profile] ${profile.agent === "zcode" ? "ZCode" : "Codex"} A
Error message
[profile] ${profile.agent === "zcode" ? "ZCode" : "Codex"} App bot worker stderr: ${chunk.toString("utf8").trim()} What it means
Raw stderr passthrough from the Codex/ZCode App bot worker child (tracked per profile.id in codexAppBotWorkers). Anything the worker writes to stderr is logged with an agent-specific label; lifecycle is managed by separate exit/error handlers that also clean the per-profile map entry.
Source
Thrown at packages/core/src/profiles/launch-service.ts:1479
const env: NodeJS.ProcessEnv = {
...process.env,
...plan.env,
...botEnv,
CCR_CODEX_BOT_WORKER: "1",
CCR_PROFILE_SURFACE: "app",
CODEXL_PROFILE_SURFACE: "app"
};
delete env.ELECTRON_NO_ATTACH_CONSOLE;
const child = spawn(launch.command, launch.args, {
detached: false,
env,
stdio: ["ignore", "ignore", "pipe"],
windowsHide: true,
windowsVerbatimArguments: launch.windowsVerbatimArguments
});
codexAppBotWorkers.set(profile.id, { agent: profile.agent, child, stateDir: botEnv.CCR_BOT_GATEWAY_STATE_DIR });
child.stderr?.on("data", (chunk) => {
console.warn(`[profile] ${profile.agent === "zcode" ? "ZCode" : "Codex"} App bot worker stderr: ${chunk.toString("utf8").trim()}`);
});
child.once("exit", (code, signal) => {
if (codexAppBotWorkers.get(profile.id)?.child === child) codexAppBotWorkers.delete(profile.id);
if (code && code !== 0) {
console.warn(`[profile] ${profile.agent === "zcode" ? "ZCode" : "Codex"} App bot worker exited: code=${code}${signal ? ` signal=${signal}` : ""}`);
}
});
child.once("error", (error) => {
if (codexAppBotWorkers.get(profile.id)?.child === child) codexAppBotWorkers.delete(profile.id);
console.warn(`[profile] ${profile.agent === "zcode" ? "ZCode" : "Codex"} App bot worker failed: ${formatError(error)}`);
});
}
function startCodexAppMediaPreviewBridge(
config: AppConfig,
profile: ReturnType<typeof findProfileForOpen>,
userDataDir: string
): void {View on GitHub (pinned to 99f24806c6)
Solutions
- Read the stderr text to classify it (noise vs pre-crash stack).
- Check the worker's exit code warnings (the sibling 'exited: code=...' message) to see if it actually crashed.
- Inspect the per-profile state dir (CCR_BOT_GATEWAY_STATE_DIR) logs for the root cause.
- Update the Codex/zcode app if the output is a known issue.
Defensive patterns
Strategy: fallback
Validate before calling
null
Type guard
null
Try / catch
null
Prevention
- Use the agent label to route diagnostics to the right tool
- Check sibling exit-code warnings for real crashes
- Inspect per-profile state dir logs
When it happens
Trigger: A Codex or ZCode profile's bot worker writes to stderr — internal diagnostics, caught-error stack traces, or dependency warnings.
Common situations: Codex CLI emitting warnings during startup or on API errors; zcode variant printing different diagnostics; benign deprecation output.
Related errors
- [profile] Claude App bot worker stderr: ${chunk.toString("ut
- [profile] OpenCode App bot worker stderr: ${chunk.toString("
- [profile] ${profile.agent === "zcode" ? "ZCode" : "Codex"} A
- [profile] Claude App bot worker failed: ${formatError(error)
- [profile] OpenCode App bot worker failed: ${formatError(erro
AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27).
Data as JSON: /api/errors/207e86e47718ebaa.
Report an issue: GitHub.