Add snipsync markers to the OpenAI Agents samples - #510
Merged
Conversation
The TypeScript OpenAI Agents SDK integration guide hand-maintained its code blocks, so nothing verified them against a running sample. Add snipsync markers scoped to exactly the code that guide shows, so it can pull from here instead. Markers wrapping indented code sit at that code's indent level rather than column 0, so snipsync's dedent still applies (see #346). mcp/worker.ts hoists its MCP providers into two named locals before Worker.create. Behavior is unchanged; it gives the stateless and stateful registrations a contiguous region a marker can wrap, and names which is which. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
xumaple
approved these changes
Aug 19, 2026
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.
What was changed
Snipsync markers on the
openai-agentssample files that the TypeScript OpenAI Agents SDK integration guide walks through. Markers only — no sample logic changes — with one exception noted below.mcp/worker.tshoists its four MCP providers into two named locals (statelessProviders,statefulProviders) beforeWorker.create. Behavior is identical; it gives the stateless and stateful registrations a contiguous region a marker can wrap, and names which is which.Why?
The guide hand-maintained 16 inline TypeScript blocks that no CI job verified, so they could drift from the SDK without anything failing. The companion docs PR replaces them with snipsync blocks pulling from here.
Two details worth flagging for review:
selectedLinesand none renders a leading// ...elision.typescript-openai-agents-streaming-workflowalready existed and is untouched.Checklist
Closes
How was this tested:
prettier --check src,tsc --noEmit, andeslint srcall pass (eslint reports only the 10 pre-existing MCP SDK deprecation warnings).Snippet resolution was verified by pointing a local
snipsync.config.yamlat this working tree and runningyarn snipsyncfrom the documentation repo: all 14 new IDs resolve, every excerpt dedents to column 0, and no block renders an elision marker.🤖 Generated with Claude Code