{"record":{"id":"afa0f26a8e5cd688","repo":"microsoft/semantic-kernel","slug":"the-step-has-not-been-initialized","errorCode":null,"errorMessage":"The step has not been initialized.","messagePattern":"The step has not been initialized\\.","errorType":"exception","errorClass":"KernelException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Experimental/Process.LocalRuntime/LocalProxy.cs","lineNumber":37,"sourceCode":"    private bool _isInitialized = false;\n\n    /// <summary>\n    /// Initializes a new instance of the <see cref=\"LocalMap\"/> class.\n    /// </summary>\n    /// <param name=\"proxy\">an instance of <see cref=\"KernelProcessProxy\"/></param>\n    /// <param name=\"kernel\">An instance of <see cref=\"Kernel\"/></param>\n    internal LocalProxy(KernelProcessProxy proxy, Kernel kernel)\n        : base(proxy, kernel)\n    {\n        this._proxy = proxy;\n        this._logger = this._kernel.LoggerFactory?.CreateLogger(this._proxy.State.Name) ?? new NullLogger<LocalStep>();\n    }\n\n    internal override void AssignStepFunctionParameterValues(ProcessMessage message)\n    {\n        if (this._functions is null || this._inputs is null || this._initialInputs is null)\n        {\n            throw new KernelException(\"The step has not been initialized.\").Log(this._logger);\n        }\n\n        if (message.Values.Count != 1)\n        {\n            throw new KernelException(\"The proxy step can only handle 1 parameter object\").Log(this._logger);\n        }\n\n        var kvp = message.Values.Single();\n\n        if (this._inputs.TryGetValue(message.FunctionName, out Dictionary<string, object?>? functionName) && functionName != null && functionName.TryGetValue(kvp.Key, out object? parameterName) && parameterName != null)\n        {\n            this._logger.LogWarning(\"Step {StepName} already has input for {FunctionName}.{Key}, it is being overwritten with a message from Step named '{SourceId}'.\", this.Name, message.FunctionName, kvp.Key, message.SourceId);\n        }\n\n        if (!this._inputs.TryGetValue(message.FunctionName, out Dictionary<string, object?>? functionParameters))\n        {\n            this._inputs[message.FunctionName] = [];\n            functionParameters = this._inputs[message.FunctionName];","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Experimental/Process.LocalRuntime/LocalProxy.cs#L19-L55","documentation":"Thrown by LocalProxy.AssignStepFunctionParameterValues when the internal fields _functions, _inputs, or _initialInputs are null. These fields are populated during InitializeStepAsync (the lazy initialization task). This error indicates that a message was assigned to the proxy step's function parameters before initialization completed or after the step was deinitialized.","triggerScenarios":"AssignStepFunctionParameterValues is called on a LocalProxy before its _initializeTask.Value has been awaited, or after DeinitializeStepAsync has cleared the internal state. The proxy step requires its plugin functions and input channels to be loaded first.","commonSituations":"Messages reaching the proxy step before the lazy initialization completes due to a race or incorrect ordering; calling AssignStepFunctionParameterValues directly instead of through HandleMessageAsync (which awaits initialization first); using a proxy step after deinitialization.","solutions":["Ensure HandleMessageAsync is the entry point (it awaits _initializeTask.Value before delegating), rather than calling AssignStepFunctionParameterValues directly.","Verify the proxy step is fully initialized before any message routing occurs by calling StartAsync which triggers the process-level initialization chain.","If the step was deinitialized, do not reuse it; create a fresh process context instead."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always route proxy step messages through HandleMessageAsync, which triggers lazy initialization first.","Do not call AssignStepFunctionParameterValues directly on LocalProxy.","Ensure StartAsync is called before any message processing begins."],"tags":["process-framework","proxy-step","initialization","internal-error"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}