{"record":{"id":"21ce6352671e56a4","repo":"exo-explore/exo","slug":"command-not-found-or-already-completed","errorCode":null,"errorMessage":"Command not found or already completed","messagePattern":"Command not found or already completed","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"src/exo/api/main.py","lineNumber":744,"sourceCode":"        )\n\n    async def delete_instance_link(\n        self, link_id: InstanceLinkId\n    ) -> InstanceLinkResponse:\n        _require_disaggregation_enabled()\n        command = DeleteInstanceLink(link_id=link_id)\n        await self._send(command)\n        return InstanceLinkResponse(\n            message=\"Command received.\", command_id=command.command_id\n        )\n\n    async def cancel_command(self, command_id: CommandId) -> CancelCommandResponse:\n        \"\"\"Cancel an active command by closing its stream and notifying workers.\"\"\"\n        sender = self._text_generation_queues.get(\n            command_id\n        ) or self._image_generation_queues.get(command_id)\n        if sender is None:\n            raise HTTPException(\n                status_code=404,\n                detail=\"Command not found or already completed\",\n            )\n\n        await self._send(TaskCancelled(cancelled_command_id=command_id))\n        sender.close()\n\n        return CancelCommandResponse(\n            message=\"Command cancelled.\",\n            command_id=command_id,\n        )\n\n    async def _token_chunk_stream(\n        self, command_id: CommandId\n    ) -> AsyncGenerator[\n        TokenChunk | ErrorChunk | ToolCallChunk | PrefillProgressChunk, None\n    ]:\n        \"\"\"Yield chunks for a given command until completion.","sourceCodeStart":726,"sourceCodeEnd":762,"githubUrl":"https://github.com/exo-explore/exo/blob/21a54c5ea0230a3bec1e1a786d200126c7e34ec6/src/exo/api/main.py#L726-L762","documentation":"Error \"Command not found or already completed\" thrown in exo-explore/exo.","triggerScenarios":"Thrown at src/exo/api/main.py:744 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":"21a54c5ea0230a3bec1e1a786d200126c7e34ec6","analyzedAt":"2026-08-26T00:02:16.033Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}