{"record":{"id":"0836fdb16640cbd6","repo":"HKUDS/nanobot","slug":"channel-system-is-reserved-for-internal-messages","errorCode":null,"errorMessage":"channel 'system' is reserved for internal messages","messagePattern":"channel 'system' is reserved for internal messages","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"nanobot/agent/loop.py","lineNumber":2352,"sourceCode":"        chat_id: str = \"direct\",\n        sender_id: str = \"user\",\n        media: list[str] | None = None,\n        on_progress: Callable[..., Awaitable[None]] | None = None,\n        on_stream: Callable[[str], Awaitable[None]] | None = None,\n        on_stream_end: Callable[..., Awaitable[None]] | None = None,\n        ephemeral: bool = False,\n        _run_extra_hooks_for_ephemeral: bool = False,\n        hooks: list[AgentHook] | None = None,\n        hook_factories: list[AgentTurnHookFactory] | None = None,\n        tools: ToolRegistry | None = None,\n        persist_user_message: bool = True,\n        runtime: LLMRuntime | None = None,\n        on_runtime_admitted: Callable[[LLMRuntime], Awaitable[None]] | None = None,\n        attributes: Mapping[str, Any] | None = None,\n    ) -> OutboundMessage | None:\n        \"\"\"Process an external message directly and return the outbound payload.\"\"\"\n        if channel == \"system\":\n            raise ValueError(\"channel 'system' is reserved for internal messages\")\n        metadata: dict[str, Any] = {}\n        if not persist_user_message:\n            metadata[turn_continuation.SKIP_USER_PERSIST_META] = True\n        msg = InboundMessage(\n            channel=channel, sender_id=sender_id, chat_id=chat_id,\n            content=content, media=media or [], metadata=metadata,\n        )\n        # Share the dispatch lock so direct calls serialize with bus turns.\n        lock = self._get_session_lock(session_key)\n        try:\n            async with lock:\n                kwargs: dict[str, Any] = {\n                    \"session_key\": session_key,\n                    \"on_progress\": on_progress,\n                    \"on_stream\": on_stream,\n                    \"on_stream_end\": on_stream_end,\n                    \"ephemeral\": ephemeral,\n                }","sourceCodeStart":2334,"sourceCodeEnd":2370,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/agent/loop.py#L2334-L2370","documentation":"Error \"channel 'system' is reserved for internal messages\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/agent/loop.py:2352 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"}