paperclipai/paperclip · error

Agent not found

Error message

Agent not found

What it means

Generic not-found sentinel from getAccessibleResource: the referenced agent id does not exist or is outside the actor's accessible scope, so the route responds 404 without distinguishing existence from authorization to avoid leaking agent ids.

Source

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

      }
      const normalizedAdapterConfig = await secretsSvc.normalizeAdapterConfigForPersistence(
        companyId,
        inputAdapterConfig,
        { strictMode: strictSecretsMode, adapterType: type },
      );
      // Prospective, non-persisted config: resolve the acting user's own user
      // secrets in owner_scoped mode (no declaration rows exist for this config).
      // Record an honest audit consumer — environment:<id> when the caller selected
      // one, otherwise system:adapter_test — never a fake agent consumer.
      const { config: runtimeAdapterConfig } = await secretsSvc.resolveAdapterConfigForRuntime(
        companyId,
        normalizedAdapterConfig,
        buildActorSecretContext(
          req,
          requestedEnvironmentId
            ? { consumerType: "environment", consumerId: requestedEnvironmentId }
            : { consumerType: "system", consumerId: "adapter_test" },
        ),
        { adapterType: type, userSecretMediation: "owner_scoped" },
      );

      const { executionTarget, environmentName, fallbackChecks, sandboxIdentityCheck, release } =
        await resolveAdapterTestExecutionContext({
          companyId,
          adapterType: type,
          environmentId: requestedEnvironmentId,
        });

      let releaseStatus: "released" | "failed" = "released";
      try {
        // Mirror the run path (resolveExecutionRunAdapterConfig): the selected
        // environment's envVars are the base env layer and the agent's
        // adapterConfig.env wins on key conflicts. Without this merge the probe
        // cannot see environment-level auth (e.g. CLAUDE_CODE_OAUTH_TOKEN) that
        // real runs receive.
        const environmentEnvChecks: AdapterEnvironmentCheck[] = [];

View on GitHub (pinned to 01ad858492)

Solutions

  1. Verify the agent id is correct and the agent exists in this company.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/routes/agents.ts:2605 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/077a663359b58c08. Report an issue: GitHub.