musistudio/claude-code-router · info

[profile] Claude App bot worker stderr: ${chunk.toString("ut

Error message

[profile] Claude App bot worker stderr: ${chunk.toString("utf8").trim()}

What it means

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.

Source

Thrown at packages/core/src/profiles/launch-service.ts:1351

    CCR_CODEX_WORKSPACE_NAME: profile.name || profile.id,
    CCR_PROFILE_SURFACE: "app",
    CODEXL_CODEX_WORKSPACE_NAME: profile.name || profile.id,
    CODEXL_PROFILE_SURFACE: "app",
    ...claudeCodeUtcTimezoneEnvOverride()
  };
  delete env.ELECTRON_NO_ATTACH_CONSOLE;

  const child = spawn(nodeLaunch.command, [runtimeFile, "claude-bot-worker", "--workspace-name", profile.name || profile.id], {
    detached: false,
    env,
    stdio: ["ignore", "ignore", "pipe"],
    windowsHide: true
  });
  claudeAppBotWorker = child;
  claudeAppBotWorkerProfileId = profile.id;
  claudeAppBotWorkerStateDir = botEnv.CCR_BOT_GATEWAY_STATE_DIR;
  child.stderr?.on("data", (chunk) => {
    console.warn(`[profile] Claude App bot worker stderr: ${chunk.toString("utf8").trim()}`);
  });
  child.once("exit", (code, signal) => {
    if (claudeAppBotWorker === child) {
      claudeAppBotWorker = undefined;
      claudeAppBotWorkerProfileId = undefined;
      claudeAppBotWorkerStateDir = undefined;
    }
    if (code && code !== 0) {
      console.warn(`[profile] Claude App bot worker exited: code=${code}${signal ? ` signal=${signal}` : ""}`);
    }
  });
  child.once("error", (error) => {
    if (claudeAppBotWorker === child) {
      claudeAppBotWorker = undefined;
      claudeAppBotWorkerProfileId = undefined;
      claudeAppBotWorkerStateDir = undefined;
    }
    console.warn(`[profile] Claude App bot worker failed: ${formatError(error)}`);

View on GitHub (pinned to 99f24806c6)

Solutions

  1. Read the stderr text — it is the worker's own diagnostic, not a gateway error.
  2. If it precedes repeated worker exits, debug the worker process itself (state dir from CCR_BOT_GATEWAY_STATE_DIR, its logs).
  3. Suppress noisy dependency warnings via NODE_OPTIONS=--no-deprecation when spawning if they are benign.
  4. Upgrade the app/core so the worker stops warning.
Defensive patterns

Strategy: fallback

Validate before calling

null

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27). Data as JSON: /api/errors/3f2d6542c00893e8. Report an issue: GitHub.