{"record":{"id":"86b5e97987812083","repo":"t8y2/dbx","slug":"agentsessionid-is-required-86b5e9","errorCode":null,"errorMessage":"agentSessionId is required","messagePattern":"agentSessionId is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/oracle-go/main.go","lineNumber":674,"sourceCode":"\tresult, shouldShutdown, err := r.dispatch(req.Method, req.Params)\n\tif err != nil {\n\t\treturn errorResponse(req.ID, err), false\n\t}\n\treturn response{JSONRPC: \"2.0\", ID: req.ID, Result: result}, shouldShutdown\n}\n\nfunc (r *runtimeServer) dispatch(method string, params map[string]json.RawMessage) (any, bool, error) {\n\tswitch method {\n\tcase \"handshake\":\n\t\treturn map[string]any{\n\t\t\t\"protocolVersion\":      multiSessionProtocolVersion,\n\t\t\t\"agentProtocolVersion\": multiSessionProtocolVersion,\n\t\t\t\"capabilities\":         []string{\"connect\", \"test_connection\", \"metadata\", \"query\", \"transaction\", \"ddl\", \"multi_session\"},\n\t\t}, false, nil\n\tcase \"open_session\":\n\t\tagentSessionID := stringParam(params, \"agentSessionId\")\n\t\tif agentSessionID == \"\" {\n\t\t\treturn nil, false, errors.New(\"agentSessionId is required\")\n\t\t}\n\t\tvar connectParams connectParams\n\t\tif err := decodeParams(params, &connectParams); err != nil {\n\t\t\treturn nil, false, err\n\t\t}\n\t\treturn map[string]bool{\"ok\": true}, false, r.openSession(agentSessionID, connectParams)\n\tcase \"close_session\":\n\t\treturn map[string]bool{\"ok\": true}, false, r.closeSession(stringParam(params, \"agentSessionId\"))\n\tcase \"validate_session\":\n\t\tagentSessionID := stringParam(params, \"agentSessionId\")\n\t\tsession, err := r.session(agentSessionID)\n\t\tif err != nil {\n\t\t\treturn nil, false, err\n\t\t}\n\t\tsession.mu.Lock()\n\t\tdefer session.mu.Unlock()\n\t\tif _, _, err := session.server.dispatch(\"validate_connection\", params); err == nil {\n\t\t\treturn map[string]bool{\"ok\": true}, false, nil","sourceCodeStart":656,"sourceCodeEnd":692,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/oracle-go/main.go#L656-L692","documentation":"Same rule as the Neo4j driver: the Oracle driver agent's dispatch for open_session requires a non-empty agentSessionId to key the new session in the runtime's session map. Empty IDs would collide and make later session lookups ambiguous, so the request is rejected.","triggerScenarios":"open_session request params with agentSessionId absent or empty string.","commonSituations":"Older client not implementing the multi_session capability handshake, template code leaving the session ID blank, JSON marshaling with omitempty dropping an empty value.","solutions":["Send a non-empty agentSessionId in open_session params.","Upgrade/align client protocol with the advertised multi_session capability.","Add a client-side check that sessionID != \"\" before dispatching open_session."],"exampleFix":"// before\n{ \"method\": \"open_session\", \"params\": {\"dsn\": dsn} }\n// after\n{ \"method\": \"open_session\", \"params\": {\"agentSessionId\": id, \"dsn\": dsn} }","handlingStrategy":"validation","validationCode":"if agentSessionID == \"\" {\n    return errors.New(\"open_session requires a non-empty agentSessionId\")\n}","typeGuard":null,"tryCatchPattern":"resp, err := dispatch(\"open_session\", params)\nif err != nil && strings.Contains(err.Error(), \"agentSessionId is required\") {\n    params[\"agentSessionId\"] = uuid.NewString()\n    return dispatch(\"open_session\", params)\n}","preventionTips":["Always pass the session ID explicitly in request params","Verify handshake advertises multi_session before using open_session","Log outgoing JSON during integration to catch dropped fields"],"tags":["oracle","rpc","protocol","session"],"backgroundTag":"missing-required-parameter","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"}