paperclipai/paperclip · error · RouteError
managed_profile_not_found
managed_profile_not_found
Error message
The selected Claude Managed profile is not configured on this Runner Lab server.
What it means
resolveManagedProfile compares the profile ID resolved from the PAPERCLIP_CLAUDE_MANAGED_PROFILE_ID environment variable (falling back to the client-supplied configuration.managedProfileId) against configuration.managedProfileId. If the env var is set and differs from the requested profile, the server concludes the requested profile is not one this Runner Lab server has configured and returns 400 managed_profile_not_found.
Source
Thrown at packages/paperclip-runner/scripts/capability-issue-thread-server.mjs:302
if (!Number.isSafeInteger(idleTimeoutMs) || idleTimeoutMs <= 0) {
throw new RouteError(400, "invalid_idle_timeout", "Warm idle timeout must be a positive integer.");
}
lifecyclePolicy = { mode: "warm", idleTimeoutMs };
}
return {
provider,
model: model || null,
...(provider === "acpx" ? { acpxAgent } : {}),
...(provider === "claude_managed" ? { managedProfileId, maxSessionListCostUsd } : {}),
...(provider === "aws_agentcore" ? { agentCoreProfileId, maxEstimatedSessionCostUsd } : {}),
lifecyclePolicy,
};
}
function resolveManagedProfile(configuration) {
const profileId = process.env.PAPERCLIP_CLAUDE_MANAGED_PROFILE_ID?.trim() || configuration.managedProfileId;
if (profileId !== configuration.managedProfileId) {
throw new RouteError(400, "managed_profile_not_found", "The selected Claude Managed profile is not configured on this Runner Lab server.");
}
const anthropicAgentId = process.env.ANTHROPIC_MANAGED_AGENT_ID?.trim();
const agentVersion = process.env.ANTHROPIC_MANAGED_AGENT_VERSION?.trim();
const environmentId = process.env.ANTHROPIC_MANAGED_ENVIRONMENT_ID?.trim();
const canonicalAgentVersion = agentVersion !== undefined
&& /^[1-9][0-9]*$/.test(agentVersion)
&& BigInt(agentVersion) <= 2_147_483_647n;
if (!process.env.ANTHROPIC_API_KEY || !profileId || !anthropicAgentId || !canonicalAgentVersion || !environmentId) {
throw new RouteError(
503,
"managed_profile_unavailable",
"The selected Claude Managed profile is not fully qualified on this Runner Lab server.",
);
}
return {
profileId,
anthropicAgentId,
agentVersion,View on GitHub (pinned to 5716fe907e)
Solutions
- Align configuration.managedProfileId in the request with the server's PAPERCLIP_CLAUDE_MANAGED_PROFILE_ID env value (or unset the env var to accept the client value).
- Refresh the client/UI profile list so it offers the profile actually provisioned on this Runner Lab server.
- Check for whitespace/case differences: the comparison is an exact !== string comparison after trimming the env value.
- Point the client at the correct Runner Lab server that hosts the requested profile.
Example fix
// before
PAPERCLIP_CLAUDE_MANAGED_PROFILE_ID=profile-b
client: { managedProfileId: "profile-a" }
// after
PAPERCLIP_CLAUDE_MANAGED_PROFILE_ID=profile-a
client: { managedProfileId: "profile-a" } Defensive patterns
Strategy: validation
Validate before calling
const serverProfile = process.env.PAPERCLIP_CLAUDE_MANAGED_PROFILE_ID?.trim();
if (serverProfile && serverProfile !== requested.managedProfileId) {
throw new Error(`Requested profile ${requested.managedProfileId} not hosted here; server hosts ${serverProfile}`);
} Type guard
function isHostedProfile(requestedId, serverEnv = process.env) {
const hosted = serverEnv.PAPERCLIP_CLAUDE_MANAGED_PROFILE_ID?.trim();
return !hosted || hosted === requestedId;
} Try / catch
try {
await configureHarness(cfg);
} catch (e) {
if (e.code === "managed_profile_not_found") {
cfg.managedProfileId = process.env.PAPERCLIP_CLAUDE_MANAGED_PROFILE_ID?.trim();
await configureHarness(cfg);
} else throw e;
} Prevention
- Discover the server's configured profile ID at startup instead of hardcoding it in clients.
- Compare profile IDs with trimmed, case-normalized strings.
- Invalidate client profile caches when the server env changes or restarts.
- Keep one source of truth for profile IDs (config service) shared by server and clients.
When it happens
Trigger: Client sends configuration.managedProfileId="profile-a" while the server env has PAPERCLIP_CLAUDE_MANAGED_PROFILE_ID=profile-b; or env var is set to an empty/whitespace string... actually trimming to a different value than the requested one also mismatches.
Common situations: Server was restarted with a different PAPERCLIP_CLAUDE_MANAGED_PROFILE_ID than clients have cached; stale UI dropdown pointing at an old profile; multi-tenant setup where a client targets a profile hosted on another server; trailing whitespace or case differences between env value and request.
Related errors
- agentcore_profile_not_found
- PAPERCLIP_EVAL_MAX_CAMPAIGN_COST_USD must be a positive fini
- paperclip_runner_aws_agentcore_profile_mismatch
- Codex working directory inside the host HOME requires an ass
- PAPERCLIP_CLOUD_RUNTIME_IDENTITY_JWKS is not configured
AI-assisted analysis of paperclipai/paperclip@5716fe907e (2026-09-02).
Data as JSON: /api/errors/7e7f8828fa374d43.
Report an issue: GitHub.