{"record":{"id":"d1cc1ce3696be549","repo":"paperclipai/paperclip","slug":"setup-token-pty-command-not-allowed","errorCode":"SETUP_TOKEN_PTY_COMMAND_NOT_ALLOWED","errorMessage":"SETUP_TOKEN_PTY_COMMAND_NOT_ALLOWED","messagePattern":"SETUP_TOKEN_PTY_COMMAND_NOT_ALLOWED","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/plugin-worker-manager.ts","lineNumber":1402,"sourceCode":"  type LoginPtyRouteState = RouteState;\n\n  // One pre-bind login pseudo-terminal record: an output chunk or an exit,\n  // normalized to a narrow scalar shape (never the raw notification object).\n  interface LoginPtyPreBindOutputRecord {\n    kind: \"output\";\n    workerSessionId: string;\n    chunk: string;\n  }\n\n  interface LoginPtyPreBindExitRecord {\n    kind: \"exit\";\n    workerSessionId: string;\n    exitCode: number | null;\n  }\n\n  type LoginPtyPreBindRecord = LoginPtyPreBindOutputRecord | LoginPtyPreBindExitRecord;\n\n  interface LoginPtyRoute {\n    hostRouteId: string;\n    state: LoginPtyRouteState;\n    workerSessionId: string | null;\n    listener: ((chunk: string) => void) | null;\n    buffered: string[];\n    deliveredChars: number;\n    terminalized: boolean;\n    settleWait: (value: { exitCode: number | null }) => void;\n    // Every output and exit record that arrived before the bind, in arrival order.\n    preBind: LoginPtyPreBindRecord[];\n    // The cumulative characters `preBind` holds. Each record charges its\n    // `workerSessionId` characters, plus the `chunk` characters for an output\n    // record.\n    preBindChars: number;\n  }\n  // The live login pseudo-terminal routes on this worker, keyed by the host\n  // route id. A route lives here from reservation — before the open call —\n  // until it terminalizes. An output or an exit notification resolves its","sourceCodeStart":1384,"sourceCodeEnd":1420,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/plugin-worker-manager.ts#L1384-L1420","documentation":"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.","triggerScenarios":"Thrown at server/src/services/plugin-worker-manager.ts:1176 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}