usestrix/strix · error · ValueError

Request {request_id} not found

Error message

Request {request_id} not found

What it means

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.

Source

Thrown at strix/tools/proxy/caido_api.py:463


async def view_request(request_id: str, *, part: RequestPart = "request") -> Any:
    return await call_with_client(
        lambda client: get_request_with_client(client, request_id, part=part)
    )


async def repeat_request(
    request_id: str,
    *,
    modifications: dict[str, Any] | None = None,
) -> dict[str, Any]:
    mods = modifications or {}

    async def _run(client: CaidoClient) -> dict[str, Any]:
        result = await get_request_with_client(client, request_id, part="request")
        if result is None or result.request.raw is None:
            raise ValueError(f"Request {request_id} not found")

        original = result.request
        raw_str = result.request.raw.decode("utf-8", errors="replace")
        components = parse_raw_request(raw_str)
        full_url = full_url_from_components(original, components, mods)
        modified = apply_modifications(components, mods, full_url)
        connection, raw = build_raw_request(
            method=modified["method"],
            url=modified["url"],
            headers=modified["headers"],
            body=modified["body"],
        )
        return await replay_send_raw(client, raw=raw, connection=connection)

    return await call_with_client(_run)


async def scope_rules(

View on GitHub (pinned to 8551339130)

Solutions

  1. Re-list/search requests via the Caido API to obtain current valid ids, then retry with a fresh id.
  2. Verify STRIX_CAIDO_URL points at the same Caido instance that holds the history.
  3. If history was pruned, re-capture the traffic to regenerate entries.
  4. Treat this error as non-retryable for the same id — pick a new id instead of retrying.
Defensive patterns

Strategy: try-catch

Validate before calling

# Soft validation: fetch first, replay only when raw exists
result = await get_request_with_client(client, request_id, part="request")
if result is None or result.request.raw is None:
    refresh_ids()  # id is stale; re-enumerate instead of replaying

Try / catch

try:
    resp = await repeat_request(request_id, modifications=mods)
except ValueError as exc:
    if f"Request {request_id} not found" in str(exc):
        ids = await search_requests(...)  # re-enumerate and optionally remap the id
        raise  # do NOT retry the same id — it will fail again

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of usestrix/strix@8551339130 (2026-08-15). Data as JSON: /api/errors/202d2ac66798e96e. Report an issue: GitHub.