Skip to content

sandbox: delimit custom SandboxAgent instructions in rendered prompt#3044

Closed
joaquinhuigomez wants to merge 1 commit intoopenai:mainfrom
joaquinhuigomez:fix/sandbox-agent-instructions-section
Closed

sandbox: delimit custom SandboxAgent instructions in rendered prompt#3044
joaquinhuigomez wants to merge 1 commit intoopenai:mainfrom
joaquinhuigomez:fix/sandbox-agent-instructions-section

Conversation

@joaquinhuigomez
Copy link
Copy Markdown
Contributor

build_sandbox_instructions concatenated the caller's instructions between the SDK base prompt (which ends with a Tool Guidelines > Shell commands section) and the per-capability fragments (which add more shell guidance). In the rendered prompt the app-specific instructions read as if they're nested inside the SDK's shell-commands section.

Wrap the additional instructions in an # Agent instructions markdown heading so they appear as a standalone, clearly delimited section between the SDK base and the capability fragments.

Fixes #3043

build_sandbox_instructions concatenated the caller's instructions
between the SDK base prompt (which ends with a 'Tool Guidelines >
Shell commands' section) and the per-capability fragments (which add
more shell guidance). The rendered prompt made the app-specific
instructions look nested inside the SDK's shell-commands section.

Wrap the additional instructions in a 'Agent instructions' markdown
heading so they read as a standalone section delimited from the
SDK-generated guidance above and below.

Fixes openai#3043
@seratch
Copy link
Copy Markdown
Member

seratch commented Apr 29, 2026

Thanks for sending this. Closing it in favor of #3047

@seratch seratch closed this Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SandboxAgent custom instructions render inside SDK shell-command guidance

2 participants