paperclipai/paperclip · error

SETUP_TOKEN_PTY_COMMAND_NOT_ALLOWED

SETUP_TOKEN_PTY_COMMAND_NOT_ALLOWED

Error message

SETUP_TOKEN_PTY_COMMAND_NOT_ALLOWED

What it means

openSetupTokenPtySession only permits the fixed CLAUDE_SETUP_TOKEN_COMMAND in the sandbox login pseudo-terminal, and the requested command differs. The allowlist exists so arbitrary commands cannot be run through the setup-token PTY; the sentinel code names this rejection.

Source

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

  type LoginPtyRouteState = RouteState;

  // One pre-bind login pseudo-terminal record: an output chunk or an exit,
  // normalized to a narrow scalar shape (never the raw notification object).
  interface LoginPtyPreBindOutputRecord {
    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

View on GitHub (pinned to 01ad858492)

Solutions

  1. The requested PTY command is not on the allowed list for setup tokens. Use an approved setup command or add it to the allow-list policy.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/plugin-worker-manager.ts:1176 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/d1cc1ce3696be549. Report an issue: GitHub.