{"record":{"id":"2b8031e4f0bd8b8d","repo":"HKUDS/Vibe-Trading","slug":"not-connected-to-signal-cli-daemon","errorCode":null,"errorMessage":"Not connected to signal-cli daemon","messagePattern":"Not connected to signal-cli daemon","errorType":"error_code","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agent/src/channels/signal.py","lineNumber":1424,"sourceCode":"        self, method: str, params: dict[str, Any] | None = None\n    ) -> dict[str, Any]:\n        \"\"\"Send a JSON-RPC request via HTTP and wait for response.\"\"\"\n        # Generate request ID\n        self._request_id += 1\n        request_id = self._request_id\n\n        # Build JSON-RPC request\n        request = {\"jsonrpc\": \"2.0\", \"method\": method, \"id\": request_id}\n\n        if params:\n            request[\"params\"] = params\n\n        return await self._send_http_request(request)\n\n    async def _send_http_request(self, request: dict[str, Any]) -> dict[str, Any]:\n        \"\"\"Send JSON-RPC request via HTTP.\"\"\"\n        if not self._http:\n            raise RuntimeError(\"Not connected to signal-cli daemon\")\n\n        try:\n            response = await self._http.post(\"/api/v1/rpc\", json=request)\n            response.raise_for_status()\n            return response.json()\n        except Exception as e:\n            self.logger.error(\"HTTP request failed: {}\", e)\n            return {\"error\": {\"message\": str(e)}}\n","sourceCodeStart":1406,"sourceCodeEnd":1433,"githubUrl":"https://github.com/HKUDS/Vibe-Trading/blob/80ffdda44c5c4db0dd84d70e051cca591cea67df/agent/src/channels/signal.py#L1406-L1433","documentation":"A JSON-RPC request was attempted via _send_http_request before the HTTP client existed, i.e. the channel is not started or start() failed.","triggerScenarios":"Calling send() or typing-indicator methods before awaiting start(), or after stop() has torn down the client.","commonSituations":"Forgetting to await channel.start(), racing startup, or using the channel after an exception in start().","solutions":["Await start() (and confirm it succeeded) before any send","Guard with the channel's running/connected state if exposed","Don't reuse a channel instance after stop()"],"exampleFix":"# before\nawait channel.send(...)  # before start\n# after\nawait channel.start()\nawait channel.send(...)","handlingStrategy":"validation","validationCode":"if not getattr(channel, '_http', None):\n    await channel.start()","typeGuard":"def is_started(ch) -> bool:\n    return getattr(ch, '_http', None) is not None and ch._running","tryCatchPattern":"except RuntimeError as e:\n    if 'Not connected' in str(e):\n        await channel.start(); retry_send()","preventionTips":["Always await start() before send","Don't reuse instances after stop()"],"tags":["signal","lifecycle","rpc"],"backgroundTag":"client-not-initialized","analyzedSha":"80ffdda44c5c4db0dd84d70e051cca591cea67df","analyzedAt":"2026-08-28T12:46:38.989Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}