Stage MCP tool outputs in Redis and write GCS behind markAsSucceeded. - #32770
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Author
|
This change is part of the following stack:
Change managed by git-spice. |
This was referenced Sep 18, 2026
Fraggle
force-pushed
the
sflory/dsbx-action-poll-cadence
branch
from
September 18, 2026 21:25
b025dfc to
6917231
Compare
Fraggle
force-pushed
the
sflory/mcp-output-redis-stage
branch
from
September 18, 2026 21:25
74bffe0 to
5b025fe
Compare
Fraggle
force-pushed
the
sflory/dsbx-action-poll-cadence
branch
from
September 18, 2026 21:35
6917231 to
7e67049
Compare
Fraggle
force-pushed
the
sflory/mcp-output-redis-stage
branch
from
September 18, 2026 21:35
5b025fe to
295f208
Compare
Fraggle
force-pushed
the
sflory/dsbx-action-poll-cadence
branch
from
September 21, 2026 08:40
7e67049 to
f5f66ad
Compare
Fraggle
force-pushed
the
sflory/mcp-output-redis-stage
branch
from
September 21, 2026 08:40
662a77a to
b4230f2
Compare
Fraggle
force-pushed
the
sflory/dsbx-action-poll-cadence
branch
from
September 21, 2026 12:54
f5f66ad to
86f6cba
Compare
Fraggle
force-pushed
the
sflory/mcp-output-redis-stage
branch
from
September 21, 2026 12:54
b4230f2 to
1d48b64
Compare
Fraggle
force-pushed
the
sflory/dsbx-action-poll-cadence
branch
from
September 21, 2026 12:54
86f6cba to
433b9c7
Compare
Fraggle
force-pushed
the
sflory/mcp-output-redis-stage
branch
from
September 21, 2026 12:54
1d48b64 to
c8d71ca
Compare
Poll and agent loop can read staged content immediately; durable persist finishes after success so tools.persistOutput drops off the critical path.
Same helpers and key scheme as agent MCP output warm/read instead of a hand-rolled Redis SET/GET. Co-authored-by: Cursor <cursoragent@cursor.com>
Follows resource-identifier-naming: string IDs are <resource>Id, not *SId. Co-authored-by: Cursor <cursoragent@cursor.com>
Fraggle
force-pushed
the
sflory/mcp-output-redis-stage
branch
from
September 21, 2026 12:56
c8d71ca to
e4ac137
Compare
davidebbo
reviewed
Sep 21, 2026
| private deferredOutputPersist: Promise<Result<void, Error>> | undefined; | ||
|
|
||
| /** | ||
| * Awaits a durable GCS persist started by {@link createOutputItems} with |
Contributor
There was a problem hiding this comment.
Is 'durable' here referring to 'durable' function calls, as opposed to fast calls?
Contributor
Author
There was a problem hiding this comment.
nope, durable as "in GCS".
davidebbo
approved these changes
Sep 21, 2026
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
MCP tool outputs now stage in Redis before
markAsSucceeded, allowing polling and the agent loop to read content without waiting for GCS.createOutputItemsandSandboxFunctionMCPActionResourcedefer durable GCS writes until after success, then exposeawaitDeferredOutputPersistto finish persistence before the activity exits while retaining DB-content fallbacks and structured-output support.Tests
Updated Vitest coverage for deferred persistence, structured content, successful durable writes, GCS write failures, DB row creation, and GCS cleanup. No manual testing recorded.
Risk
Medium risk in the Redis staging and write-behind consistency window. Redis staging remains best-effort, DB content remains available for agent outputs, sandbox actions fall back to synchronous GCS persistence when staging fails, and durable-write errors are logged and surfaced to the caller. Roll back by reverting the front changes.
Deploy Plan
Deploy
front. No SQL migrations or infrastructure changes are required. Monitor Redis staging failures, deferred GCS persistence errors, and MCP output availability after rollout.