Skip to content

[pull] main from vercel:main#353

Merged
pull[bot] merged 2 commits into
erickirt:mainfrom
vercel:main
May 25, 2026
Merged

[pull] main from vercel:main#353
pull[bot] merged 2 commits into
erickirt:mainfrom
vercel:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 25, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

karthikscale3 and others added 2 commits May 25, 2026 11:15
* Fix cookbook pattern for AI SDK

The AI SDK cookbook entry presented `streamText` inside a `"use step"`
turn function with tools also marked `"use step"`. That implies tools
are individually durable, but the `"use step"` directive is a no-op
when called from another step — so tools run as plain inline functions
inside `runTurn`, and the durability boundary is the entire turn.

Changes:

- Remove the `"use step"` directive from tool implementations in the
  workflow code sample and add an explanatory comment.
- Update the frontmatter summary and intro paragraph to drop the
  inaccurate "tools remain durable steps" claim.
- Add a "Tools are not individually durable" entry to Pitfalls with
  consequences and mitigations (idempotency or `DurableAgent`).
- Add a `runTurn` durability-boundary bullet to "How it works".
- Add a "Tool call durability" row to the `streamText` vs `DurableAgent`
  comparison table.
- Fix two misleading Key APIs bullets that claimed tools wrap
  `"use step"` functions and that `"use step"` makes tool executions
  durable.

Applied identically to both v4 and v5 cookbook entries.

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

* Apply suggestion from @VaguelySerious

Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>

* Correct outdated DurableAgent guidance in AI SDK cookbook.

The callout and comparison table incorrectly claimed DurableAgent lacks stopWhen, structured output, and onStepFinish — update them to reflect the actual implementation and clarify when raw streamText() is still appropriate.

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

* Reword tool comment to describe current behavior, not a changelog.

Address review feedback: the inline comment should explain how tools run inside runTurn without referencing removed "use step" directives.

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

---------

Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
* docs(cookbook): replace child workflow polling with hook resume pattern

Recommend startAndWait() with withChildCompletionHook() for v4 and v5 child
workflow orchestration instead of getRun().status polling loops.

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

* Fix child-workflows cookbook review feedback

Tighten resumeParentCompletion to a discriminated union so hook.resume
typechecks, add zod to the vitest workbench, remove unused resumeHook
import, and add an empty changeset per AGENTS.md.

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

* docs(cookbook): trim child-workflows hook resume guide

Remove redundant polling comparison copy, the getRun() alternative section, and v5-only start() tips to keep the cookbook focused on the hook pattern.

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

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
@pull pull Bot locked and limited conversation to collaborators May 25, 2026
@pull pull Bot added the ⤵️ pull label May 25, 2026
@pull pull Bot merged commit c58cae6 into erickirt:main May 25, 2026
13 of 31 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant