{"record":{"id":"dd7b3f4da029f30c","repo":"medusajs/medusa","slug":"config-is-not-available-for-the-input-object","errorCode":null,"errorMessage":"Config is not available for the input object.","messagePattern":"Config is not available for the input object\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/workflows-sdk/src/utils/composer/create-workflow.ts","lineNumber":166,"sourceCode":"      context.hooks_.declared.push(name)\n      context.hooksCallback_[name] = fn.bind(context)()\n    },\n    stepBinder: (fn) => {\n      return fn.bind(context)()\n    },\n    parallelizeBinder: (fn) => {\n      return fn.bind(context)()\n    },\n  }\n\n  global[OrchestrationUtils.SymbolMedusaWorkflowComposerContext] = context\n\n  const inputPlaceHolder = proxify<WorkflowData>({\n    __type: OrchestrationUtils.SymbolInputReference,\n    __step__: \"\",\n    config: () => {\n      // TODO: config default value?\n      throw new Error(\"Config is not available for the input object.\")\n    },\n  })\n\n  const returnedStep = composer.apply(context, [inputPlaceHolder])\n\n  delete global[OrchestrationUtils.SymbolMedusaWorkflowComposerContext]\n\n  if (newWorkflow) {\n    WorkflowManager.update(name, context.flow, handlers, options)\n  } else {\n    WorkflowManager.register(name, context.flow, handlers, options)\n  }\n\n  const workflow = exportWorkflow<TData, TResult>(name, returnedStep, {\n    wrappedInput: true,\n    sourcePath: fileSourcePath,\n  })\n","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/core/workflows-sdk/src/utils/composer/create-workflow.ts#L148-L184","documentation":"In Medusa's workflow composer, the workflow input is a proxy placeholder. Calling .config() on the input proxy throws by design because the raw input object carries no configuration; config() is only meaningful on step outputs inside the composer. This guard prevents developers from reading configuration that does not exist yet.","triggerScenarios":"Calling input.config() inside a createWorkflow callback where input is the WorkflowData placeholder; accessing config on the proxified input reference (SymbolInputReference proxy).","commonSituations":"Assuming WorkflowData has a fluent config API like step outputs do; porting code from an older workflows-sdk version where config behaved differently; IntelliSense autocompletion selecting config() on the input proxy.","solutions":["Remove the input.config() call; configuration belongs on the workflow runner (workflow.run({ input, config })) or on steps, not on the input proxy","If you need conditional behavior based on options, pass them through the input itself and read them via transform()","Check the version of @medusajs/workflows-sdk you use and align with its composer docs"],"exampleFix":"// before\ncreateWorkflow(\"w\", (input) => { input.config() /* throws */ })\n\n// after\ncreateWorkflow(\"w\", (input) => { someStep(input) })\n// config goes to the runner: myWorkflow(req.scope).run({ input, config: { retry: 2 } })","handlingStrategy":"validation","validationCode":"// Pass options through input, not input.config()\nawait myWorkflow(container).run({\n  input: { orderId, notify: true },\n  config: { retry: 2 }, // runner-level config is valid\n})","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Never call .config() on a workflow's input proxy","Read workflow options from input fields via transform()","Set execution options on workflow.run(), not on input"],"tags":["workflows-sdk","createworkflow","input-proxy","config"],"backgroundTag":"workflow-input-config-misuse","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}