Skip to content

session:spawn relays the raw provider exception over IPC (q22 at the source) #1267

Closed

Description

@Juliusolsson05

Found by #1264 review B (R2-2).

src/main/ipc/session.ts (session:spawn handler) rethrows the raw provider exception, so its text crosses IPC. recover() already launders it into SESSION_START_FAILED_MESSAGE (sessionManager.ts recoverSession); session:spawn does not.

Why it matters (steering q22): provider launch exceptions can carry environment values, proxy URLs or scoped MCP tokens. The incident journals already hold one such text verbatim as a renderer.unhandledrejection from a spawn nobody caught. Each renderer surface currently has to remember not to show it (#1262, #1264 did so by hand).

Fix: flatten in main's session:spawn handler, as recover does: journal the raw error, throw SESSION_START_FAILED_MESSAGE, and pass MissingWorkspaceDirectoryError through (its message is curated; MISSING_WORKSPACE_FOLDER_PREFIX after #1264). Fail-first test: a spawn that throws a message containing a token-shaped string must reach the renderer without it.

Severity: P2 (class C3/security), not user-triggered today.

🤖 Generated with Claude Code

Activity

  1. added
    bugSomething isn't working
    type:bugSomething works wrong
    sev:P2Real bug with a workaround
    on Sep 25, 2026
  2. Juliusolsson05 commented on Sep 25, 2026

    @Juliusolsson05
    OwnerAuthor

    Status after #1286 (merged via batch #1318, 2026-09-25).

    Renderer side, done: sessionSpawnErrorMessage now flattens every spawn rejection to the safe sentence, once, for every caller (newTab, reload, provider switch, rewind, creates, and the orchestration tool error). Only three curated messages pass: the proxy startup failure, the missing folder (rebuilt from the renderer's own cwd), and a missing provider CLI (known provider ids only).

    Still open (this issue): session:spawn in main still relays the raw provider exception over IPC. The fix belongs at the source, like recoverSession.

  3. added a commit that references this issue on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclass:C3-silent-failureThe app knows it failed and does not saysev:P2Real bug with a workaroundtype:bugSomething works wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions