{"record":{"id":"b757c192eb385c5f","repo":"odysseus-dev/odysseus","slug":"invalid-session-id-format","errorCode":null,"errorMessage":"Invalid session ID format","messagePattern":"Invalid session ID format","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"routes/research/research_routes.py","lineNumber":26,"sourceCode":"from datetime import datetime\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom fastapi import APIRouter, HTTPException, Query, Request\nfrom fastapi.responses import HTMLResponse, StreamingResponse\nfrom pydantic import BaseModel, Field\nfrom core.middleware import INTERNAL_TOOL_USER\nfrom src.endpoint_resolver import resolve_endpoint\nfrom src.auth_helpers import _auth_disabled, get_current_user\nfrom core.auth import RESERVED_USERNAMES\nfrom src.constants import DEEP_RESEARCH_DIR\n\n_SESSION_ID_RE = re.compile(r\"^[a-zA-Z0-9-]{1,128}$\")\n\n\ndef _validate_session_id(session_id: str) -> str:\n    if not _SESSION_ID_RE.fullmatch(session_id):\n        raise HTTPException(400, \"Invalid session ID format\")\n    return session_id\n\n\ndef _research_storage_root() -> Path:\n    return Path(DEEP_RESEARCH_DIR).resolve()\n\n\ndef _find_research_path(session_id: str) -> Path | None:\n    \"\"\"Find a persisted research file without deriving its path from input.\"\"\"\n    expected_name = f\"{_validate_session_id(session_id)}.json\"\n    root = _research_storage_root()\n    for stored_path in root.glob(\"*.json\"):\n        if stored_path.name != expected_name:\n            continue\n        resolved = stored_path.resolve()\n        try:\n            resolved.relative_to(root)\n        except ValueError:","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/research/research_routes.py#L8-L44","documentation":"Error \"Invalid session ID format\" thrown in odysseus-dev/odysseus.","triggerScenarios":"Triggered when the corresponding server-side validation or runtime check at the recorded location rejects the request or operation and returns this error message to the caller.","commonSituations":"See trigger scenarios.","solutions":["Use a valid session id format (no path or special characters).","Copy the session id from the session list rather than typing it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f9235ebbf13f693a6fd29ce70b097f6ec83705bf","analyzedAt":"2026-08-14T21:47:48.359Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}