{"record":{"id":"7df07e70d4ab8b7a","repo":"HKUDS/nanobot","slug":"expect-reply-true-requires-reply-timeout-seconds-b","errorCode":null,"errorMessage":"expect_reply=true requires reply_timeout_seconds between {MIN_REPLY_TIMEOUT_SECONDS} and {MAX_REPLY_TIMEOUT_SECONDS}","messagePattern":"expect_reply=true requires reply_timeout_seconds between (.+?) and (.+?)","errorType":"exception","errorClass":"SessionMessageError","httpStatus":null,"severity":"error","filePath":"nanobot/agent/tools/session_messages.py","lineNumber":287,"sourceCode":"                    envelope,\n                )\n\n        return f\"@{target.name}\"\n\n    @staticmethod\n    def _validate_reply_timeout(\n        expect_reply: bool,\n        reply_timeout_seconds: int | None,\n    ) -> int | None:\n        if not expect_reply:\n            return None\n        if (\n            reply_timeout_seconds is None\n            or not MIN_REPLY_TIMEOUT_SECONDS\n            <= reply_timeout_seconds\n            <= MAX_REPLY_TIMEOUT_SECONDS\n        ):\n            raise SessionMessageError(\n                \"expect_reply=true requires reply_timeout_seconds between \"\n                f\"{MIN_REPLY_TIMEOUT_SECONDS} and {MAX_REPLY_TIMEOUT_SECONDS}\",\n            )\n        return reply_timeout_seconds\n\n    def _cancel_pending_reply(self, key: tuple[str, str]) -> None:\n        pending = self._pending_replies.pop(key, None)\n        if pending is not None and pending.timer is not None:\n            pending.timer.cancel()\n\n    def _schedule_pending_reply(\n        self,\n        key: tuple[str, str],\n        timeout_seconds: int,\n        target_handle: str,\n        request: SessionMessageEnvelope,\n    ) -> None:\n        pending = _PendingReply(","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/agent/tools/session_messages.py#L269-L305","documentation":"Raised by _validate_reply_timeout when expect_reply is true but reply_timeout_seconds is None or outside [MIN_REPLY_TIMEOUT_SECONDS, MAX_REPLY_TIMEOUT_SECONDS]. The reply-wait machinery cannot honor an unbounded or invalid timeout, so the send is rejected before enqueue.","triggerScenarios":"Thrown at nanobot/agent/tools/session_messages.py:287 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set reply_timeout_seconds to a value within the documented bounds (e.g. 60)","Omit expect_reply (fire-and-forget) if no reply wait is needed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","contentChangedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}