Skip to content

[Cherry-pick] Cherry-pick to release-v0.177.0 - #968

Merged
truefoundry-saas merged 4 commits into
release-v0.177.0from
cherry-pick/899ed502-7cb2-475e-b87f-41145ff617cb/release-v0.177.0
Oct 6, 2026
Merged

truefoundry-saas merged 4 commits into
release-v0.177.0from
cherry-pick/899ed502-7cb2-475e-b87f-41145ff617cb/release-v0.177.0

Conversation

@truefoundry-saas

@truefoundry-saas truefoundry-saas commented Oct 6, 2026 •

Copy link
Copy Markdown

Automated cherry-pick for release request 899ed502-7cb2-475e-b87f-41145ff617cb.

Source PRs (merged to main):

Do not merge manually — this PR is merged automatically when the release request is approved. If you do merge it yourself, use "Sync status" on the request so it stops showing as pending.


Note

Medium Risk
Default timeout changes alter when model and MCP calls fail or succeed, and the SSE write timeout changes streaming client behavior under slow consumers; metrics typing affects billing visibility but is additive.

Overview
Release cherry-pick that adjusts outbound timeouts, hardens create-turn streaming, and fixes usage display for failed/cancelled turns.

Outbound defaults: Model provider body idle timeout goes from 5s to 60s (config, core constants, and .env.example). MCP end-to-end request and matching headers timeout defaults drop from 4 minutes to 2 minutes.

Create-turn SSE: Each SSE writeSSE is bounded by new TURN_SSE_STREAM_WRITE_TIMEOUT_MS (default 60s). On timeout or write failure, the handler stops writing to that client, logs disconnect/timeout, may abort the stream, but keeps turn event drain and dual-write so subscribers still get events.

UI / types: TurnStateCancelled and TurnStateError may carry metrics; the agent-server toUiTurnState adapter maps those through like done, so turn headers and session totals can include tokens/cost from error and cancelled terminal states. Tests cover error/cancelled mapping and session view derivation.

OpenAPI/docs version bumps to 0.177.0-rc.2; changesets document the patch-level package releases.

Reviewed by Cursor Bugbot for commit 4a698c8. Bugbot is set up for automated code reviews on this repo. Configure here.

truefoundry-saas and others added 3 commits October 6, 2026 14:14
…lity (#964)

* feat: implement timeout for create-turn SSE writes to enhance reliability

* fix: ensure proper handling of SSE stream disconnection and draining logic in createTurnsRouter
…uest timeout to 2 minutes. (#965)

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4a698c8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@truefoundry/trueforge Patch
@truefoundry/trueforge-core Patch
@truefoundry/trueforge-assistant-ui-runtime Patch
@truefoundry/trueforge-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4a698c8. Configure here.

});
if (!shouldWriteToSSEStream && !stream.closed) {
stream.abort();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hung SSE write stays uncancelled

Medium Severity

withTimeout races writeSSE without cancelling it, and stream.abort() runs only after drainTurnEvents finishes. A stalled create-turn write therefore stays outstanding for the rest of the turn, so stream.close() can still wait on that write and the HTTP handler never finishes even though drain and dual-write continued.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4a698c8. Configure here.

@truefoundry-saas
truefoundry-saas merged commit b9429a0 into release-v0.177.0 Oct 6, 2026
16 checks passed
@truefoundry-saas
truefoundry-saas deleted the cherry-pick/899ed502-7cb2-475e-b87f-41145ff617cb/release-v0.177.0 branch October 6, 2026 09:04
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