{"record":{"id":"e7a2a2fd55285b2f","repo":"HKUDS/nanobot","slug":"session-target-name-was-not-found","errorCode":null,"errorMessage":"session @{target_name} was not found","messagePattern":"session @(.+?) was not found","errorType":"exception","errorClass":"SessionMessageError","httpStatus":null,"severity":"error","filePath":"nanobot/agent/tools/session_messages.py","lineNumber":222,"sourceCode":"        return f\"Sent to {target}.\"\n\n    async def enqueue(\n        self,\n        *,\n        source_session_key: str,\n        target_handle: str,\n        content: str,\n        expect_reply: bool,\n        reply_timeout_seconds: int | None = None,\n    ) -> str:\n        timeout_seconds = self._validate_reply_timeout(expect_reply, reply_timeout_seconds)\n        try:\n            target_name = normalize_session_handle(target_handle)\n        except ValueError as exc:\n            raise SessionMessageError(str(exc)) from exc\n        target = await asyncio.to_thread(self._handles.resolve, target_name)\n        if target is None:\n            raise SessionMessageError(f\"session @{target_name} was not found\")\n\n        source = await asyncio.to_thread(\n            self._handles.handle_for_session,\n            source_session_key,\n        )\n        if source is None:\n            raise SessionMessageError(\"source session was not found\")\n        envelope: SessionMessageEnvelope = {\n            \"message_id\": uuid4().hex,\n            \"created_at_ms\": int(time.time() * 1000),\n            \"expect_reply\": expect_reply,\n            \"source_handle\": source.name,\n            \"source_session_key\": source.session_key,\n            \"target_session_key\": target.session_key,\n        }\n        reverse_wait_key = (target.session_key, source.session_key)\n        wait_key = (source.session_key, target.session_key)\n","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/agent/tools/session_messages.py#L204-L240","documentation":"Error \"session @{target_name} was not found\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/agent/tools/session_messages.py:222 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":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}