Skip to content

feat(api): add agent environment suspension and expiration - #821

Merged
jbeckwith-oai merged 1 commit into
mainfrom
castiron/promotions/pr-192
Oct 9, 2026
Merged

jbeckwith-oai merged 1 commit into
mainfrom
castiron/promotions/pr-192

Conversation

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Summary

Adds client support for agent environment suspension and expiration events.

Changes

  • Add suspended and expired agent session environment stream event types
  • Add suspended and expired agent environment webhook event types
  • Allow the new webhook event names in webhook subscription parameters

Castiron-Internal-PR: openai/openai-ruby-internal#192
Castiron-Source-SHA: 0e467742f47a3f79b31913695460bdc31c250c46
Castiron-Public-Base-SHA: 38b524b
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

Evaluated main: 38b524b6c4e1f1b53a26cc01760439de5da4bc40.

✅ No new custom-code files detected.

84 mixed files remain; 0 existing customizations changed; 3 generated baselines changed.

Compared 38b524b6c4e1 → 81836ee719d4. Generated baselines verified.

File Result Current custom patch
lib/openai.rb Generated baseline changed +46 / −7
lib/openai/resources/beta/agents/sessions.rb Generated baseline changed +66 / −4
lib/openai/resources/webhooks.rb Generated baseline changed +46 / −34
81 existing customizations unchanged
  • lib/openai/client.rb
  • lib/openai/models/audio/transcription_create_response.rb
  • lib/openai/models/audio/translation_create_response.rb
  • lib/openai/models/audio/voice_create_params.rb
  • lib/openai/models/beta/agents/vault_status_filter.rb
  • lib/openai/models/chat/chat_completion_message.rb
  • lib/openai/models/chat/chat_completion_message_function_tool_call.rb
  • lib/openai/models/chat/completion_create_params.rb
  • lib/openai/models/image_edit_completed_event.rb
  • lib/openai/models/image_edit_partial_image_event.rb
  • lib/openai/models/image_gen_completed_event.rb
  • lib/openai/models/image_gen_partial_image_event.rb
  • lib/openai/models/images_response.rb
  • lib/openai/models/response_format_json_schema.rb
  • lib/openai/models/responses/function_tool.rb
  • lib/openai/models/responses/response.rb
  • lib/openai/models/responses/response_create_params.rb
  • lib/openai/models/responses/response_format_text_config.rb
  • lib/openai/models/responses/response_format_text_json_schema_config.rb
  • lib/openai/models/responses/response_function_tool_call.rb
  • lib/openai/models/responses/response_function_web_search.rb
  • lib/openai/models/responses/response_output_text.rb
  • lib/openai/models/responses/tool.rb
  • lib/openai/models/webhooks/webhook_endpoint_with_secret.rb
  • lib/openai/resources/audio/transcriptions.rb
  • lib/openai/resources/audio/translations.rb
  • lib/openai/resources/beta/agents/environments/files.rb
  • lib/openai/resources/beta/agents/sessions/artifacts.rb
  • lib/openai/resources/beta/threads.rb
  • lib/openai/resources/chat/completions.rb
  • lib/openai/resources/containers/files.rb
  • lib/openai/resources/files.rb
  • lib/openai/resources/responses.rb
  • lib/openai/resources/vector_stores/file_batches.rb
  • lib/openai/resources/vector_stores/files.rb
  • rbi/openai/client.rbi
  • rbi/openai/models/audio/transcription_create_response.rbi
  • rbi/openai/models/audio/translation_create_response.rbi
  • rbi/openai/models/beta/agents/vault_status_filter.rbi
  • rbi/openai/models/chat/chat_completion_message.rbi

41 more in the full report.

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download the exact patch produced by this run (requires repository access):

gh run download 37984144886 --repo openai/openai-ruby \
  --name castiron-custom-code-37984144886-1 --dir /tmp/castiron-custom-code-37984144886-1
git apply --stat /tmp/castiron-custom-code-37984144886-1/custom-code.patch
cat /tmp/castiron-custom-code-37984144886-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin 38b524b6c4e1f1b53a26cc01760439de5da4bc40 81836ee719d42a3063d164cd34664a833cb4db8a
python3 scripts/castiron/custom_code_report.py report \
  --base 38b524b6c4e1f1b53a26cc01760439de5da4bc40 \
  --head 81836ee719d42a3063d164cd34664a833cb4db8a --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-81836ee719d4
cat /tmp/castiron-custom-code-81836ee719d4/custom-code.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

@jbeckwith-oai
jbeckwith-oai marked this pull request as ready for review October 9, 2026 20:00
@jbeckwith-oai
jbeckwith-oai requested a review from a team as a code owner October 9, 2026 20:00
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T20:02:36.962226Z 81836ee Draft marked ready
🔒 Security Review ✅ Completed 2026-10-09T20:03:16.853112Z 81836ee Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openai-sdks

openai-sdks Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 7.22s for Ruby SDK PR #821.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 205ms
tests/chat-completions-create.test.ts ✅ Passed 210ms
tests/chat-completions-stream.test.ts ✅ Passed 154ms
tests/files-content-binary.test.ts ✅ Passed 160ms
tests/files-create-multipart.test.ts ✅ Passed 150ms
tests/files-list-pagination.test.ts ✅ Passed 140ms
tests/initialize-config.test.ts ✅ Passed 126ms
tests/instance-isolation.test.ts ✅ Passed 117ms
tests/models-list.test.ts ✅ Passed 164ms
tests/responses-background-lifecycle.test.ts ✅ Passed 167ms
tests/responses-body-method-errors.test.ts ✅ Passed 343ms
tests/responses-cancel-timeout.test.ts ✅ Passed 261ms
tests/responses-cancel.test.ts ✅ Passed 235ms
tests/responses-compact-retries.test.ts ✅ Passed 167ms
tests/responses-compact.test.ts ✅ Passed 221ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 191ms
tests/responses-create-advanced.test.ts ✅ Passed 202ms
tests/responses-create-disconnect.test.ts ✅ Passed 151ms
tests/responses-create-errors.test.ts ✅ Passed 270ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 146ms
tests/responses-create-retries.test.ts ✅ Passed 150ms
tests/responses-create-stream-failures.test.ts ✅ Passed 185ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 238ms
tests/responses-create-stream-wire.test.ts ✅ Passed 889ms
tests/responses-create-stream.test.ts ✅ Passed 118ms
tests/responses-create-terminal-states.test.ts ✅ Passed 265ms
tests/responses-create-timeout.test.ts ✅ Passed 229ms
tests/responses-create.test.ts ✅ Passed 137ms
tests/responses-delete.test.ts ✅ Passed 133ms
tests/responses-input-items-errors.test.ts ✅ Passed 178ms
tests/responses-input-items-list.test.ts ✅ Passed 164ms
tests/responses-input-items-options.test.ts ✅ Passed 176ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 293ms
tests/responses-input-tokens-count.test.ts ✅ Passed 138ms
tests/responses-malformed-inputs.test.ts ✅ Passed 1.023s
tests/responses-not-found-errors.test.ts ✅ Passed 295ms
tests/responses-parse.test.ts ✅ Passed 188ms
tests/responses-retrieve-retries.test.ts ✅ Passed 173ms
tests/responses-retrieve.test.ts ✅ Passed 228ms
tests/responses-stored-method-errors.test.ts ✅ Passed 744ms
tests/retry-behavior.test.ts ✅ Passed 3.415s
tests/sdk-error-shape.test.ts ✅ Passed 365ms

View OkTest run #37984094027

SDK merge (280daa131922) · head (81836ee719d4) · base (38b524b6c4e1) · OkTest (aae4f6a5102a)

@jbeckwith-oai
jbeckwith-oai added this pull request to the merge queue Oct 9, 2026

@markstuart-oai markstuart-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved at 81836ee719d42a3063d164cd34664a833cb4db8a.

The new lifecycle classes and status values match the schema and are included in stream and webhook unions, autoloads, subscription parameters, RBI, and RBS declarations. The tests exercise typed SSE and signed webhook decoding with round-trip payload checks. The existing verification path remains unchanged.

All current public CI checks pass. This was a source and hosted-CI review; I ran no repository tests or live backend calls. Backend activation remains a separate rollout step.

Merged via the queue into main with commit 7405e40 Oct 9, 2026
22 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the castiron/promotions/pr-192 branch October 9, 2026 20:27
@openai-sdks openai-sdks Bot mentioned this pull request Oct 9, 2026
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.

3 participants