{"record":{"id":"77d8eac5838ccf7a","repo":"paperclipai/paperclip","slug":"claude-managed-live-sessions-require-a-qualified-m","errorCode":null,"errorMessage":"Claude Managed live sessions require a qualified managed profile","messagePattern":"Claude Managed live sessions require a qualified managed profile","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/live/live-session.ts","lineNumber":868,"sourceCode":"  readonly #store: CapabilityLiveSessionStore;\n  readonly #transportFactory: CapabilityLiveTransportFactory;\n  readonly #transportOptions: CapabilityRunnerdCodexTransportOptions;\n  readonly #now: () => Date;\n  readonly #sessions = new Map<string, CapabilityLiveSession>();\n\n  constructor(options: CapabilityLiveSessionServiceOptions = {}) {\n    this.#store = options.store ?? new InMemoryCapabilityLiveSessionStore();\n    this.#transportFactory = options.transportFactory ?? createCapabilityRunnerdCodexTransport;\n    this.#transportOptions = options.transportOptions ?? {};\n    this.#now = options.now ?? (() => new Date());\n  }\n\n  async create(input: CreateCapabilityLiveSessionInput = {}): Promise<CapabilityLiveSession> {\n    if (input.provider === \"acpx\" && input.acpxAgent === \"pi\") {\n      throw new Error(\"The Pi ACPX profile is not available\");\n    }\n    if (input.provider === \"claude_managed\" && !input.managedProfile) {\n      throw new Error(\"Claude Managed live sessions require a qualified managed profile\");\n    }\n    if (input.provider === \"aws_agentcore\" && !input.agentCoreProfile) {\n      throw new Error(\"AWS AgentCore live sessions require a qualified AgentCore profile\");\n    }\n    if (\n      (input.provider === \"claude_managed\" || input.provider === \"aws_agentcore\") &&\n      !input.requestedModel?.trim()\n    ) {\n      throw new Error(\"Managed live sessions require an explicit qualified model\");\n    }\n    const port = new CapabilityMockControlPlaneAdapter(input.seed);\n    const seedState = port.serialize();\n    await port.start();\n    const state = port.snapshot();\n    const sessionId = input.sessionId ?? randomUUID();\n    const runId = input.runId ?? randomUUID();\n    const acpxProfile = input.provider === \"acpx\"\n      ? resolveQualifiedAcpxProfile(input.acpxAgent ?? \"codex\", requireNonEmpty(input.requestedModel ?? \"\", \"requested_model\"))","sourceCodeStart":850,"sourceCodeEnd":886,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/src/live/live-session.ts#L850-L886","documentation":"CapabilityLiveSession.create validates that claude_managed provider sessions carry a managedProfile describing the qualified managed setup. Missing it means the runner has no profile to drive the managed Claude session, so it throws before creating any session state.","triggerScenarios":"Calling create({ provider: 'claude_managed' }) without input.managedProfile, or with managedProfile set to undefined/null (e.g. from incomplete config).","commonSituations":"Config loading omits the managed profile section; copying an example that used the default provider; switching provider to claude_managed without adding profile credentials/settings.","solutions":["Pass a valid input.managedProfile object when using provider 'claude_managed'","Fix config loading so the managed profile (credentials, model ceiling, etc.) is populated before create()","Validate the profile exists before constructing the create() input","Use a non-managed provider if a managed profile is genuinely not available"],"exampleFix":"// before\nawait liveSession.create({ provider: 'claude_managed' });\n// after\nif (!managedProfile) throw new Error('configure managedProfile for claude_managed');\nawait liveSession.create({ provider: 'claude_managed', managedProfile });","handlingStrategy":"validation","validationCode":"if (input.provider === 'claude_managed' && !input.managedProfile) throw new Error('managedProfile required for claude_managed sessions');","typeGuard":"function hasManagedProfile(input: { provider: string; managedProfile?: object }): input is { provider: 'claude_managed'; managedProfile: object } {\n  return input.provider === 'claude_managed' && !!input.managedProfile;\n}","tryCatchPattern":"try {\n  await liveSession.create(input);\n} catch (err) {\n  if (err instanceof Error && err.message.includes('require a qualified managed profile')) {\n    // surface config error to operator\n  } else throw err;\n}","preventionTips":["Validate provider-specific required fields before create()","Load and verify managed profiles during config init","Use typed input builders that require the profile per provider"],"tags":["live-session","claude","validation"],"backgroundTag":"missing-required-profile","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-02T18:44:00.616Z","contentChangedAt":"2026-09-02T18:44:00.616Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}