paperclipai/paperclip · error

SETUP_TOKEN_PTY_ROUTE_BUSY

SETUP_TOKEN_PTY_ROUTE_BUSY

Error message

SETUP_TOKEN_PTY_ROUTE_BUSY

What it means

The single setup-token PTY route is already reserved by another open session. Only one live login pseudo-terminal per worker is allowed, so the second concurrent open fails with this sentinel code.

Source

Thrown at server/src/services/plugin-worker-manager.ts:1407

    kind: "output";
    workerSessionId: string;
    chunk: string;
  }

  interface LoginPtyPreBindExitRecord {
    kind: "exit";
    workerSessionId: string;
    exitCode: number | null;
  }

  type LoginPtyPreBindRecord = LoginPtyPreBindOutputRecord | LoginPtyPreBindExitRecord;

  interface LoginPtyRoute {
    hostRouteId: string;
    state: LoginPtyRouteState;
    workerSessionId: string | null;
    listener: ((chunk: string) => void) | null;
    buffered: string[];
    deliveredChars: number;
    terminalized: boolean;
    settleWait: (value: { exitCode: number | null }) => void;
    // Every output and exit record that arrived before the bind, in arrival order.
    preBind: LoginPtyPreBindRecord[];
    // The cumulative characters `preBind` holds. Each record charges its
    // `workerSessionId` characters, plus the `chunk` characters for an output
    // record.
    preBindChars: number;
  }
  // The live login pseudo-terminal routes on this worker, keyed by the host
  // route id. A route lives here from reservation — before the open call —
  // until it terminalizes. An output or an exit notification resolves its
  // route through this map first, so more than one route can be `reserved`,
  // `opening`, or `open` on one worker at once.
  const loginPtyRoutesByHostRouteId = new Map<string, LoginPtyRoute>();
  // True once this worker has logged the missing-`hostRouteId` warning below.
  // A plugin build old enough to omit the field would otherwise log one line

View on GitHub (pinned to 01ad858492)

Solutions

  1. Another PTY session is active on this route. Close the existing session or wait for it to finish before opening a new one.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at server/src/services/plugin-worker-manager.ts:1181 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18). Data as JSON: /api/errors/b5d261c10bfab549. Report an issue: GitHub.