{"record":{"id":"0584da1ea6697fb5","repo":"CopilotKit/CopilotKit","slug":"action-name-failed-to-execute-error","errorCode":null,"errorMessage":"Action '{name}' failed to execute: {error}","messagePattern":"Action '(.+?)' failed to execute: (.+?)","errorType":"exception","errorClass":"ActionExecutionException","httpStatus":null,"severity":"error","filePath":"sdk-python/copilotkit/sdk.py","lineNumber":295,"sourceCode":"        Execute an action\n        \"\"\"\n\n        action = self._get_action(context=context, name=name)\n\n        self._log_request_info(\n            title=\"Handling execute action request:\",\n            data=[\n                (\"Context\", context),\n                (\"Action\", action.dict_repr()),\n                (\"Arguments\", arguments),\n            ],\n        )\n\n        try:\n            result = action.execute(arguments=arguments)\n            return result\n        except Exception as error:\n            raise ActionExecutionException(name, error) from error\n\n    def execute_agent(  # pylint: disable=too-many-arguments\n        self,\n        *,\n        context: CopilotKitContext,\n        name: str,\n        thread_id: str,\n        state: dict,\n        config: Optional[dict] = None,\n        messages: List[Message],\n        actions: List[ActionDict],\n        node_name: str,\n        meta_events: Optional[List[MetaEvent]] = None,\n    ) -> Any:\n        \"\"\"\n        Execute an agent\n        \"\"\"\n        agents = self.agents(context) if callable(self.agents) else self.agents","sourceCodeStart":277,"sourceCodeEnd":313,"githubUrl":"https://github.com/CopilotKit/CopilotKit/blob/68fbe97d87420bd84e8196965c71bd6e394a3f7a/sdk-python/copilotkit/sdk.py#L277-L313","documentation":"Error \"Action '{name}' failed to execute: {error}\" thrown in CopilotKit/CopilotKit.","triggerScenarios":"Thrown at sdk-python/copilotkit/sdk.py:295 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"68fbe97d87420bd84e8196965c71bd6e394a3f7a","analyzedAt":"2026-08-27T04:03:26.537Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}