paperclipai/paperclip · error

Agent is outside this actor's authorization boundary

Error message

Agent is outside this actor's authorization boundary

What it means

The agents route's access check (assertAgentReadAllowed / access.decide) denied agent:read for the requesting actor: the agent lies outside the actor's authorization boundary (wrong company or insufficient grants). Surfaced as a forbidden/authorization failure.

Source

Thrown at server/src/routes/agents.ts:590

    // vice versa): each entry closes over its own readiness check and its own
    // promotion function.
    promotionByAdapterType: {
      codex_local: {
        async promote(authBytes, context) {
          // Hold the promotion critical-section lock across the ownership check and
          // the credential write. The reaper takes the same lock before it reclaims
          // a stale `promoting` row. So a reclaim never interleaves with a live
          // write: the reaper either wins the lock first and the ownership check
          // then reads a reclaimed row and writes nothing, or the write finishes
          // first under the lock and the reaper reclaims only after it completes. A
          // read-only fence is not enough, because the filesystem write can start
          // after the fence; the lock spans the whole section.
          const outcome = await adapterLoginStore.withCompanyAdapterPromotionLock(
            context.companyId,
            context.startedByUserId,
            context.adapterType,
            () =>
              promoteDeviceLoginCredential({
                authBytes,
                companyId: context.companyId,
                userInitiated: true,
                checkReadiness: (bytes) => checkStagedCredentialReadiness(bytes),
                isSoleActiveOwner: async () => {
                  // The partial unique index allows one active row per company and
                  // adapter. So a `promoting` row for this session is the sole
                  // active owner of the company credential slot. The read runs
                  // inside the lock, so it observes a reaper reclaim that committed
                  // before this section acquired the lock.
                  const row = await adapterLoginStore.get(context.sessionId);
                  return row?.status === "promoting" && row.companyId === context.companyId;
                },
                log: (line) => {
                  // The promotion lines carry no token bytes and no raw account id,
                  // so it is safe to log them with the session identifier.
                  logger.info({ sessionId: context.sessionId }, line);
                },

View on GitHub (pinned to 5716fe907e)

Solutions

  1. Access only agents within the actor's authorized company scope.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/routes/agents.ts:584 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@5716fe907e (2026-08-18). Data as JSON: /api/errors/32c56046c55f6e39. Report an issue: GitHub.