{"record":{"id":"2c7bb35d6c9a59e8","repo":"t8y2/dbx","slug":"agentsessionid-is-required-2c7bb3","errorCode":null,"errorMessage":"agentSessionId is required","messagePattern":"agentSessionId is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/tdengine/src/runtime.rs","lineNumber":227,"sourceCode":"                self.close_all_sessions().await;\n                Ok(json!({\"ok\": true}))\n            }\n            _ => {\n                if !is_driver_method(method) {\n                    bail!(\"unknown method: {method}\");\n                }\n                let id = session_id(&params).unwrap_or_else(|| LEGACY_SESSION_ID.to_string());\n                let session = self.session(&id).await?;\n                let mut driver = session.driver.lock().await;\n                let (token, _operation) = session.begin_operation();\n                dispatch_driver(&mut driver, method, &params, &token).await\n            }\n        }\n    }\n\n    async fn open_session(&self, id: &str, params: ConnectParams) -> Result<()> {\n        if id.trim().is_empty() {\n            bail!(\"agentSessionId is required\");\n        }\n        {\n            let sessions = self.sessions.read().await;\n            if sessions.contains_key(id) {\n                bail!(\"agent session already exists: {id}\");\n            }\n        }\n        let slot = self\n            .session_slots\n            .clone()\n            .try_acquire_owned()\n            .map_err(|_| anyhow!(\"agent session limit reached: {MAX_AGENT_SESSIONS}\"))?;\n        let mut driver = TdengineDriver::new();\n        driver.connect(params).await?;\n        let session = Arc::new(AgentSession {\n            driver: Mutex::new(driver),\n            active: StdMutex::new(None),\n            next_operation_id: AtomicU64::new(1),","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/tdengine/src/runtime.rs#L209-L245","documentation":"Bailed by the TDengine runtime open_session when the agentSessionId parameter is missing or whitespace-only. Session-scoped dispatch requires an explicit session id (unlike the legacy single-session methods), so the request is rejected before a connection is created.","triggerScenarios":"Thrown at agents/drivers/tdengine/src/runtime.rs:227 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include a non-empty agentSessionId in the open_session params","Generate a unique id per session (the caller owns id allocation)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}