-
Notifications
You must be signed in to change notification settings - Fork 16.3k
feat(codex): document native image generation in /codex skill#1986
Open
seungwonme wants to merge 1 commit into
Open
feat(codex): document native image generation in /codex skill #1986seungwonme wants to merge 1 commit into
seungwonme wants to merge 1 commit into
Conversation
Codex CLI ships a native image_gen.imagegen tool, but the skill's read-only sandbox rule makes image-generation consults silently fail: the tool call succeeds, the PNG can't be saved. - Add Image Generation section: swap to -s workspace-write for image-making consults, scope writes to a scratch dir under TMP_ROOT (-C + --skip-git-repo-check), show the result to the user - Name this as the sole exception in Important Rules - Regenerate codex/SKILL.md via bun run gen:skill-docs Verified by having Codex enumerate its callable tools and generate a 1254x1254 PNG with code-drawing fallbacks (SVG/matplotlib) forbidden.
Merging to main in this repository is managed by Trunk.
- To merge this pull request, check the box to the left or comment
/trunk mergebelow.
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here
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.
TL;DR
Codex CLI ships a native image-generation tool (
image_gen.imagegen), but the /codex skill's hard "read-only, never modify files" rule makes image-generation consults silently fail — the tool call succeeds, the generated PNG just can't be saved. This documents the capability and the one sanctioned exception.What changed
## Image Generationsection incodex/SKILL.md.tmpl(after Model & Reasoning):-s read-only→-s workspace-writewhen the consult asks Codex to MAKE an image (not analyze one)$TMP_ROOTvia-C+--skip-git-repo-check, so nothing lands in the user's repoImportant Rulesfirst bullet now names this as the sole exception to "Never modify files"codex/SKILL.mdregenerated viabun run gen:skill-docsVerified
Asked Codex to enumerate its callable tools and generate an image with code-drawing fallbacks (SVG/matplotlib) explicitly forbidden: it listed
image_gen.imagegenand produced a real ×ばつ1254 PNG. Saving worked underworkspace-write; the skill's defaultread-onlysandbox blocks it.