Skip to content

examples/sandbox: Add Unix local PTY multiturn example#3035

Closed
liuzengh wants to merge 1 commit intoopenai:mainfrom
liuzengh:codex/unix-local-pty-multiturn-example
Closed

examples/sandbox: Add Unix local PTY multiturn example#3035
liuzengh wants to merge 1 commit intoopenai:mainfrom
liuzengh:codex/unix-local-pty-multiturn-example

Conversation

@liuzengh
Copy link
Copy Markdown

Summary

Adds a new Unix-local sandbox example that runs two agent turns against the same live sandbox session. The first turn writes a file in the workspace, the second turn reads and appends to that same file, and the script verifies the final file contents through the sandbox session.

Also updates the sandbox examples README with the new runnable example.

Validation

  • .venv/bin/python -m py_compile examples/sandbox/unix_local_pty_multiturn.py
  • source ../gpt.sh && PYTHONUNBUFFERED=1 .venv/bin/python examples/sandbox/unix_local_pty_multiturn.py

The live run verified that the second turn saw the first turn's state/session_counter.txt and appended turn-2: beta.

@liuzengh liuzengh changed the title [codex] Add Unix local PTY multiturn example examples/sandbox: Add Unix local PTY multiturn example Apr 27, 2026
@liuzengh liuzengh marked this pull request as ready for review April 27, 2026 06:13
@seratch
Copy link
Copy Markdown
Member

seratch commented Apr 27, 2026

Thanks for sharing this idea. We won't add this example within this SDK repo, but please feel free to share it in your own repositories and/or posts. Thanks again for sharing it!

@seratch seratch closed this Apr 27, 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.

2 participants