Repository navigation
Conversation
Remove the manual retry loop. The SDK retries 409 with backoff up to 8 seconds. Five retries wait about 15 seconds in total. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Make the key one time for each script run. The SDK sends the same key on each retry, so OpenAI ignores duplicate submissions. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Both clients now write session.json with mode 600 and fail if the file exists. TypeScript gets the "wx" flag so that it matches the Python O_EXCL behavior. Both clients check SANDBOX_ID before they open the event stream. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 16, 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.
Summary
Clean up the Python and TypeScript clients and their tests. See
testing.mdfor test steps.Decisions:
create_sessionkeepsmax_retries=0, because session creation has no idempotency key and a retry could make a second session.create_sessionnow usesflag: "wx"to match the PythonO_EXCLcheck.Error, so Node prints a stack trace. Python exits with only the message.tmp_path/<lang>/andprompt.txttotmp_path/, so no test writes to the shared parent directory.I checked the retry behavior in the installed SDKs (Python
openai3.24.0, TypeScriptopenai7.30.0). Both retry 409 with backoff from 0.5 s to 8 s. Both send the caller'sIdempotency-Keyagain on each retry.Evidence
SANDBOX_ID, Python fails withKeyError: 'SANDBOX_ID'.test_missing_sandbox_id[run_task|wait_for_sandbox], for both languages: exits non-zero withSet SANDBOX_ID first., makes no API or CLI call, and Python prints no traceback.test_create_and_no_overwrite: also checks thatsession.jsonhas mode 600.test_cleanup[conflict]: still sees two DELETE requests, now from SDK retries.npm run typecheck --prefix typescriptpasses.Merge Danger
Door: two-way
Blast Radius: clients
The cleanup retry window is shorter than before, about 15 s in place of 36 s. A session that rejects deletion for longer keeps
session.json, and you can run cleanup again.🤖 Generated with Claude Code