Skip to content

fix(web): stabilize run lifecycle and timeout recovery#170

Draft
kumarabhirup wants to merge 1 commit into
mainfrom
pr/web-run-lifecycle-reliability
Draft

fix(web): stabilize run lifecycle and timeout recovery#170
kumarabhirup wants to merge 1 commit into
mainfrom
pr/web-run-lifecycle-reliability

Conversation

@kumarabhirup
Copy link
Copy Markdown
Collaborator

Summary

  • retry clean empty-upstream completions more deliberately, including the Claude-to-GPT fallback path for zero-token responses
  • keep stop routing, session keys, and active-run bookkeeping aligned so manual stops and resumed streams resolve the intended run
  • tighten the chat panel inactivity watchdog and add focused coverage across the API, runner, settings, and panel layers

Context

This change comes out of the recent empty-response and mid-stream timeout debugging work. The web app was vulnerable to runs that exited cleanly without assistant text, tool-heavy sessions that looked idle even though work was still in flight, and stop requests that could miss the active gateway-backed run when the session identity changed underneath the UI.

Test plan

  • pnpm --dir apps/web test
  • pnpm --dir apps/web build (validated in an isolated worktree to avoid .next conflicts with a running local dev server)

Made with Cursor

Keep chat runs recoverable when the agent exits without visible text by tightening empty-response retries, stop routing, and stream continuation state across the API, runner, and panel layers. Add coverage for session-key aborts, inactivity watchdogs, and model-aware fallback handling so stalled runs resolve consistently.

Made-with: Cursor
@kumarabhirup kumarabhirup marked this pull request as draft April 8, 2026 17:01
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.

1 participant