Skip to content

fix: treat prompt timeout as inactivity limit - #2

Open
wylab wants to merge 1 commit into
SuperagenticAI:mainfrom
wylab:fix/prompt-stream-inactivity-timeout
Open

fix: treat prompt timeout as inactivity limit#2
wylab wants to merge 1 commit into
SuperagenticAI:mainfrom
wylab:fix/prompt-stream-inactivity-timeout

Conversation

@wylab

@wylab wylab commented Aug 30, 2026

Copy link
Copy Markdown

Problem

PrimeSession.prompt_stream computes one absolute deadline for an entire agent turn. Active turns that continuously emit events are therefore aborted after 600 seconds with PrimeRequestTimeout("prompt_events", ...).

Fix

Apply prompt_timeout to each wait for the next event. The timeout now detects an inactive/stalled stream without imposing a total runtime limit on healthy long-running turns.

Regression coverage

The fake RPC emits progress events for longer than the configured timeout while keeping every inter-event gap below it. The new test fails on the old absolute-deadline behavior and passes with the inactivity timeout.

Validated with:

  • pytest -q (16 passed)
  • ruff check .
  • mypy src

Copilot AI lite review requested due to automatic review settings August 30, 2026 09:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants