paperclipai/paperclip · error · Error
request.managedProfile.betaVersion is not qualified
Error message
request.managedProfile.betaVersion is not qualified
What it means
parseManagedProfile enforces that request.managedProfile.betaVersion equals exactly 'managed-agents-2026-04-01'. This fail-closed pin prevents sessions from being created against unqualified or mismatched beta API versions. Any other value (or a missing field) throws this error.
Source
Thrown at packages/paperclip-runner/src/cli/eval-session-contract.ts:137
? "opencode_server"
: provider === "claude_managed"
? "claude_managed_agents_api"
: provider === "aws_agentcore"
? "aws_agentcore_harness_api"
: provider === "acpx" ? "acpx_runtime" : "codex_app_server";
}
function positiveNumber(value: unknown, path: string): number {
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) {
throw new Error(`${path} must be a positive finite number`);
}
return value;
}
function parseManagedProfile(value: unknown): EvalSessionManagedProfile {
const profile = object(value, "request.managedProfile");
if (profile.betaVersion !== "managed-agents-2026-04-01") {
throw new Error("request.managedProfile.betaVersion is not qualified");
}
const agentVersion = text(
profile.agentVersion,
"request.managedProfile.agentVersion",
);
if (
!/^[1-9][0-9]*$/.test(agentVersion) ||
BigInt(agentVersion) > 2_147_483_647n
) {
throw new Error(
"request.managedProfile.agentVersion must be a canonical positive int32 string",
);
}
return {
profileId: text(profile.profileId, "request.managedProfile.profileId"),
anthropicAgentId: text(
profile.anthropicAgentId,
"request.managedProfile.anthropicAgentId",View on GitHub (pinned to 01ad858492)
Solutions
- Set request.managedProfile.betaVersion to exactly 'managed-agents-2026-04-01'
- If the managed-agents API version legitimately changed, update both the caller and this pinned contract together
- Remove surrounding whitespace and fix date formatting to the exact qualified string
- Confirm the caller is targeting the managed-agents beta, not another Anthropic API surface
Example fix
// before
{ betaVersion: 'managed-agents-2025-11-01', agentVersion: '42' }
// after
{ betaVersion: 'managed-agents-2026-04-01', agentVersion: '42' } Defensive patterns
Strategy: validation
Validate before calling
const QUALIFIED_BETA = 'managed-agents-2026-04-01';
if (req.managedProfile?.betaVersion !== QUALIFIED_BETA) {
throw new Error(`betaVersion must be ${QUALIFIED_BETA}`);
} Type guard
function isQualifiedManagedProfile(p) {
return typeof p?.betaVersion === 'string' && p.betaVersion === 'managed-agents-2026-04-01';
} Try / catch
try {
const request = parseEvalSessionRequest(raw);
} catch (err) {
if (err.message.includes('betaVersion is not qualified')) {
throw new VersionMismatchError('Managed-agents beta version pinned in this build: managed-agents-2026-04-01', { cause: err });
}
throw err;
} Prevention
- Import the qualified beta version constant from the contract instead of hardcoding strings
- When the managed-agents API bumps versions, update caller and contract in the same change
- Trim and exact-match version strings; watch date formatting (zero-padded months)
- Test profile construction against the pinned constant in CI
When it happens
Trigger: Calling parseEvalSessionRequest where request.managedProfile.betaVersion is absent, misspelled, uses a different date stamp (e.g. a newer or older beta version string), or has different casing/whitespace.
Common situations: The managed-agents API bumped its beta version string and the caller updated their SDK but not this pinned constant (or vice versa); a hardcoded profile in config predates the qualified version; a typo like 'managed-agents-2026-4-01'.
Related errors
- request.managedProfile.agentVersion must be a canonical posi
- unsupported request schema
- ${path} must be an object
- ${path} must be a non-empty string
- ${path} must be a positive safe integer
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-09-02).
Data as JSON: /api/errors/b0ae736897750af3.
Report an issue: GitHub.