{"record":{"id":"b3eb673f7fa20e21","repo":"paperclipai/paperclip","slug":"login-is-only-supported-for-claude-local-agents","errorCode":null,"errorMessage":"Login is only supported for claude_local agents","messagePattern":"Login is only supported for claude_local agents","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"server/src/routes/agents.ts","lineNumber":4954,"sourceCode":"        Object.prototype.hasOwnProperty.call(patchData, \"defaultEnvironmentId\")\n          ? (typeof patchData.defaultEnvironmentId === \"string\" ? patchData.defaultEnvironmentId : null)\n          : existing.defaultEnvironmentId,\n        {\n          allowedDrivers: allowedEnvironmentDriversForAgent(requestedAdapterType),\n          allowedSandboxProviders: allowedSandboxProvidersForAgent(requestedAdapterType),\n        },\n      );\n    }\n    const touchesProfileFields = touchesAgentProfileChangeConsentFields(patchData);\n    const profileOnlyChange = touchesProfileFields && Object.keys(patchData).every((key) =>\n      (AGENT_PROFILE_CHANGE_CONSENT_FIELDS as readonly string[]).includes(key),\n    );\n    if (profileOnlyChange) {\n      await assertCanApplyAgentProfileChange(req, existing);\n    } else {\n      await assertCanUpdateAgent(req, existing);\n    }\n\n    const actor = getActorInfo(req);\n    const agent = await svc.update(id, patchData, {\n      recordRevision: {\n        createdByAgentId: actor.agentId,\n        createdByUserId: actor.actorType === \"user\" ? actor.actorId : null,\n        source: \"patch\",\n      },\n      claudeLogin: {\n        ownerUserId: req.actor.type === \"agent\" ? null : (req.actor.userId ?? null),\n        // The apply-existing path runs only for a user actor. The owner comes\n        // from the actor, so an agent actor never reaches the no-claim bind.\n        applyExistingWithoutClaim:\n          req.actor.type !== \"agent\" && applyStoredClaudeLogin,\n      },\n    });\n    if (!agent) {\n      res.status(404).json({ error: \"Agent not found\" });\n      return;","sourceCodeStart":4936,"sourceCodeEnd":4972,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/agents.ts#L4936-L4972","documentation":"Capability guard on POST /agents/:id/claude-login: the interactive Claude login flow only applies to agents using the claude_local adapter, but this agent's adapterType is different, so the login attempt is rejected as unsupported for this agent.","triggerScenarios":"Thrown at server/src/routes/agents.ts:4400 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the login flow only for claude_local agents; other adapters authenticate differently."],"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-14T00:17:10.932Z"}