{"record":{"id":"202d2ac66798e96e","repo":"usestrix/strix","slug":"request-request-id-not-found","errorCode":null,"errorMessage":"Request {request_id} not found","messagePattern":"Request (.+?) not found","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"strix/tools/proxy/caido_api.py","lineNumber":463,"sourceCode":"\n\nasync def view_request(request_id: str, *, part: RequestPart = \"request\") -> Any:\n    return await call_with_client(\n        lambda client: get_request_with_client(client, request_id, part=part)\n    )\n\n\nasync def repeat_request(\n    request_id: str,\n    *,\n    modifications: dict[str, Any] | None = None,\n) -> dict[str, Any]:\n    mods = modifications or {}\n\n    async def _run(client: CaidoClient) -> dict[str, Any]:\n        result = await get_request_with_client(client, request_id, part=\"request\")\n        if result is None or result.request.raw is None:\n            raise ValueError(f\"Request {request_id} not found\")\n\n        original = result.request\n        raw_str = result.request.raw.decode(\"utf-8\", errors=\"replace\")\n        components = parse_raw_request(raw_str)\n        full_url = full_url_from_components(original, components, mods)\n        modified = apply_modifications(components, mods, full_url)\n        connection, raw = build_raw_request(\n            method=modified[\"method\"],\n            url=modified[\"url\"],\n            headers=modified[\"headers\"],\n            body=modified[\"body\"],\n        )\n        return await replay_send_raw(client, raw=raw, connection=connection)\n\n    return await call_with_client(_run)\n\n\nasync def scope_rules(","sourceCodeStart":445,"sourceCodeEnd":481,"githubUrl":"https://github.com/usestrix/strix/blob/85513391305171ecc6faffe03da4a8bda5e3febb/strix/tools/proxy/caido_api.py#L445-L481","documentation":"repeat_request() first fetches the stored request via get_request_with_client(client, request_id, part='request'). If the lookup returns None or the request's raw payload is None, it raises ValueError('Request {id} not found'). So the id either doesn't exist in Caido or exists but has no raw request bytes.","triggerScenarios":"Calling repeat_request with a stale, wrong-scope, or deleted Caido request id; or an id whose entry exists but carries no raw request content (e.g. response-only or pruned history). The failure happens before any parsing or replay.","commonSituations":"Ids harvested from an earlier session after Caido history was cleared; typos or truncated ids passed by an LLM agent; Caido restarted with non-persistent storage; id from a different Caido instance/port.","solutions":["Re-list/search requests via the Caido API to obtain current valid ids, then retry with a fresh id.","Verify STRIX_CAIDO_URL points at the same Caido instance that holds the history.","If history was pruned, re-capture the traffic to regenerate entries.","Treat this error as non-retryable for the same id — pick a new id instead of retrying."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# Soft validation: fetch first, replay only when raw exists\nresult = await get_request_with_client(client, request_id, part=\"request\")\nif result is None or result.request.raw is None:\n    refresh_ids()  # id is stale; re-enumerate instead of replaying","typeGuard":null,"tryCatchPattern":"try:\n    resp = await repeat_request(request_id, modifications=mods)\nexcept ValueError as exc:\n    if f\"Request {request_id} not found\" in str(exc):\n        ids = await search_requests(...)  # re-enumerate and optionally remap the id\n        raise  # do NOT retry the same id — it will fail again","preventionTips":["Resolve ids and replay in the same session; don't cache ids across Caido restarts.","Keep STRIX_CAIDO_URL stable so history lookups hit the same instance.","In agent loops, treat 'not found' as a signal to re-list, never to retry."],"tags":["proxy","caido","request-id","replay"],"backgroundTag":null,"analyzedSha":"85513391305171ecc6faffe03da4a8bda5e3febb","analyzedAt":"2026-08-15T05:03:57.275Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}