Skip to content

PR #1109 only handles errors inside stream_input - 3+ other root causes of hanging query() not addressed #1136

Description

@knoal

Problem

PR #1109 (fix: surface prompt stream errors instead of hanging query()) only handles errors inside stream_input's own try/except. The "hanging query()" symptom has at least 3 other plausible root causes not addressed.

Impact

  • The fix may not address the actual hang root cause in many cases
  • A real hang could still occur in the unhandled scenarios
  • The test relies on anyio.fail_after(5) to convert a hang into a pass - brittle and not really a failing-first test

What was audited

MCE audit Tcas1109 (2026-07-19) caught 3 HIGH attacks via F-C:

  1. The test does not actually exercise the original bug on a failing-first basis - before the fix, stream_input() swallowed the exception and returned; the CLI would then wait for input
  2. P1's confidence of 0.85 is overstated - the fix only handles errors inside stream_input's own try/except
  3. P4 confidence (0.6) is too high and the test is brittle - it relies on anyio.fail_after(5) to convert a hang into a pass

Recommended fix

  1. The author should:
    a. Identify and address all 3+ root causes of the hanging query() symptom
    b. Write failing-first tests that exercise each root cause
    c. Avoid relying on anyio.fail_after to convert hangs into passes

Cross-references

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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