{"record":{"id":"8f3e3ef89fccc53b","repo":"paperclipai/paperclip","slug":"trustpreset-detail","errorCode":null,"errorMessage":"${trustPreset.detail}","messagePattern":"\\$\\{trustPreset\\.detail\\}","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"server/src/routes/agents.ts","lineNumber":3396,"sourceCode":"          await assertSandboxLoginEnvironment(companyId, data.environmentId);\n          await assertCodexLoginProviderCapability(data.environmentId);\n        },\n      });\n      if (!resolved) return;\n      const { ownerUserId: startedByUserId, data } = resolved;\n\n      const controller = new AbortController();\n      let result: Awaited<ReturnType<typeof adapterLoginService.start>>;\n      try {\n        result = await adapterLoginService.start({\n          companyId,\n          environmentId: data.environmentId,\n          adapterType: type,\n          startedByUserId,\n          ttlSeconds: data.ttlSeconds,\n          signal: controller.signal,\n        });\n      } catch (error) {\n        // A second active login for the same company and adapter loses the\n        // credential slot. Map the service conflict to a 409 response.\n        if (error instanceof AdapterAuthSessionConflictError) {\n          throw conflict(error.message);\n        }\n        throw error;\n      }\n\n      // Keep the controller so the cancel route can abort the in-flight run.\n      // Drop it when the run ends. The completion runs the terminal handling in\n      // the background; the response returns the initial session at once.\n      const startedSessionId = result.session.sessionId;\n      adapterLoginAbortControllers.set(startedSessionId, controller);\n      void result.completed\n        .catch(() => {})\n        .finally(() => {\n          adapterLoginAbortControllers.delete(startedSessionId);\n        });","sourceCodeStart":3378,"sourceCodeEnd":3414,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/agents.ts#L3378-L3414","documentation":"Trust-prereset rejection on GET /agents/:id: the agent is reading its own record, but resolving its self-trust preset failed and the preset's detail message (e.g. unknown preset key or configuration conflict) is surfaced as the error body.","triggerScenarios":"Thrown at server/src/routes/agents.ts:2972 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the trust preset detail and adjust the request or agent trust configuration accordingly."],"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"}