paperclipai/paperclip · error · HttpError
oauth_challenge
oauth_challenge
Error message
This app needs you to sign in.
What it means
Auth-challenge translation: a request to the remote app returned 401/402-style responses indicating the stored OAuth authorization is absent or stale, so the user must (re)authorize. Surfaced to the UI as an oauth_challenge rather than a raw upstream error; the connection's missing/stale authorization is at fault.
Source
Thrown at server/src/services/tool-access.ts:3050
limit,
windowSeconds: 3600,
});
}
}
async function hasExplicitConnectionTokenMintProfileGrant(input: {
companyId: string;
agentId: string;
issueId: string | null;
projectId: string | null;
routineId: string | null;
}) {
const bindings = await db.select().from(toolProfileBindings).where(eq(toolProfileBindings.companyId, input.companyId));
const matchingBindings = bindings.filter((binding) => {
if (binding.targetType === "company") return binding.targetId === input.companyId;
if (binding.targetType === "agent") return binding.targetId === input.agentId;
if (binding.targetType === "issue") return Boolean(input.issueId && binding.targetId === input.issueId);
if (binding.targetType === "project") return Boolean(input.projectId && binding.targetId === input.projectId);
if (binding.targetType === "routine") return Boolean(input.routineId && binding.targetId === input.routineId);
return false;
});
const profileIds = profileIdsInBindingOrder(narrowestScopeBindings(matchingBindings));
if (profileIds.length === 0) return false;
const profiles = await db.select().from(toolProfiles).where(and(
eq(toolProfiles.companyId, input.companyId),
inArray(toolProfiles.id, profileIds),
));
const activeProfileIds = profiles
.filter((profile) => profile.status === "active")
.map((profile) => profile.id);
if (activeProfileIds.length === 0) return false;
const entries = await db.select().from(toolProfileEntries).where(and(
eq(toolProfileEntries.companyId, input.companyId),
inArray(toolProfileEntries.profileId, activeProfileIds),
));
return activeProfileIds.some((profileId) => {View on GitHub (pinned to 01ad858492)
Solutions
- Complete the sign-in/OAuth flow for this app (reconnect it from the connections UI) so an authorized session exists.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at server/src/services/tool-access.ts:2906 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/eecd34e1e539899b.
Report an issue: GitHub.