paperclipai/paperclip · error

The Claude login start request is invalid.

Error message

The Claude login start request is invalid.

What it means

The Claude setup-token login start spine rejected the request body: startClaudeSetupTokenSessionRequestSchema validation failed; the message is the route's configured invalidRequestError, not a runtime failure.

Source

Thrown at server/src/routes/adapter-login-route-spine.ts:95

 * null when a step sends a response; the caller must then stop.
 */
export async function runAdapterLoginStartSpine<TData extends { environmentId: string }>(
  input: AdapterLoginStartSpineInput<TData>,
): Promise<AdapterLoginStartResolution<TData> | null> {
  const ownerUserId = await input.deriveOwner();

  if (input.guardBeforeValidate) {
    await input.guardBeforeValidate();
  }

  const body =
    input.req.body && typeof input.req.body === "object"
      ? (input.req.body as Record<string, unknown>)
      : {};
  const candidate = input.requestOverrides ? { ...body, ...input.requestOverrides } : body;
  const parsed = input.requestSchema.safeParse(candidate);
  if (!parsed.success) {
    input.res.status(400).json({ error: input.invalidRequestError });
    return null;
  }
  const data = parsed.data;

  if (input.guardAfterValidate) {
    const stop = await input.guardAfterValidate(data);
    if (stop) return null;
  }

  await input.assertSandbox(data);
  return { ownerUserId, data };
}

View on GitHub (pinned to a7e689b3c3)

Solutions

  1. Send the required setup-token start fields per the schema
  2. Verify environmentId is included and correct
  3. Retry with a well-formed JSON body
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/routes/adapter-login-route-spine.ts:95 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-21). Data as JSON: /api/errors/9b73909c61f99ae2. Report an issue: GitHub.