t8y2/dbx · error
agentSessionId is required
Error message
agentSessionId is required
What it means
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.
Source
Thrown at agents/drivers/tdengine/src/runtime.rs:227
self.close_all_sessions().await;
Ok(json!({"ok": true}))
}
_ => {
if !is_driver_method(method) {
bail!("unknown method: {method}");
}
let id = session_id(¶ms).unwrap_or_else(|| LEGACY_SESSION_ID.to_string());
let session = self.session(&id).await?;
let mut driver = session.driver.lock().await;
let (token, _operation) = session.begin_operation();
dispatch_driver(&mut driver, method, ¶ms, &token).await
}
}
}
async fn open_session(&self, id: &str, params: ConnectParams) -> Result<()> {
if id.trim().is_empty() {
bail!("agentSessionId is required");
}
{
let sessions = self.sessions.read().await;
if sessions.contains_key(id) {
bail!("agent session already exists: {id}");
}
}
let slot = self
.session_slots
.clone()
.try_acquire_owned()
.map_err(|_| anyhow!("agent session limit reached: {MAX_AGENT_SESSIONS}"))?;
let mut driver = TdengineDriver::new();
driver.connect(params).await?;
let session = Arc::new(AgentSession {
driver: Mutex::new(driver),
active: StdMutex::new(None),
next_operation_id: AtomicU64::new(1),View on GitHub (pinned to c0390bff16)
Solutions
- Include a non-empty agentSessionId in the open_session params
- Generate a unique id per session (the caller owns id allocation)
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at agents/drivers/tdengine/src/runtime.rs:227 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/2c7bb35d6c9a59e8.
Report an issue: GitHub.