HKUDS/nanobot · error · SessionMessageError
session @{target_name} was not found
Error message
session @{target_name} was not found What it means
Error "session @{target_name} was not found" thrown in HKUDS/nanobot.
Source
Thrown at nanobot/agent/tools/session_messages.py:222
return f"Sent to {target}."
async def enqueue(
self,
*,
source_session_key: str,
target_handle: str,
content: str,
expect_reply: bool,
reply_timeout_seconds: int | None = None,
) -> str:
timeout_seconds = self._validate_reply_timeout(expect_reply, reply_timeout_seconds)
try:
target_name = normalize_session_handle(target_handle)
except ValueError as exc:
raise SessionMessageError(str(exc)) from exc
target = await asyncio.to_thread(self._handles.resolve, target_name)
if target is None:
raise SessionMessageError(f"session @{target_name} was not found")
source = await asyncio.to_thread(
self._handles.handle_for_session,
source_session_key,
)
if source is None:
raise SessionMessageError("source session was not found")
envelope: SessionMessageEnvelope = {
"message_id": uuid4().hex,
"created_at_ms": int(time.time() * 1000),
"expect_reply": expect_reply,
"source_handle": source.name,
"source_session_key": source.session_key,
"target_session_key": target.session_key,
}
reverse_wait_key = (target.session_key, source.session_key)
wait_key = (source.session_key, target.session_key)
View on GitHub (pinned to 42f37dc4c0)
When it happens
Trigger: Thrown at nanobot/agent/tools/session_messages.py:222 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26).
Data as JSON: /api/errors/e7a2a2fd55285b2f.
Report an issue: GitHub.