Skip to content

[BUG] scarf.finding() + posthog.finding() block asyncio event loop up to 20s per finding #672

Description

@chirag127

Problem

create_vulnerability_report (async function_tool) reaches posthog.finding() and scarf.finding() on the event loop; both use blocking urllib.request.urlopen(..., timeout=10). When either endpoint is slow/unreachable, each finding stalls the loop up to ~20s combined, freezing every other agent tool call in the scan.

Call path

  • strix/tools/reporting/tool.py:261report_state.add_vulnerability_report(...) called synchronously from async def _do_create.
  • strix/report/state.py:269-270 — calls posthog.finding(severity) then scarf.finding(severity).
  • strix/telemetry/posthog.py:45-46urllib.request.urlopen(req, timeout=10).
  • strix/telemetry/scarf.py:46-47 — same pattern, timeout=10.

Expected

Telemetry sends off the event loop (e.g. asyncio.to_thread, background queue, or httpx.AsyncClient).

Actual

Each finding blocks the event loop up to ~20s cumulative when telemetry endpoints are slow.

Environment

strix-agent 1.0.4, Python >=3.12 (per pyproject.toml).

Thanks for maintaining usestrix/strix!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions