Codex design-shotgun should use image_gen instead of requiring OpenAI API keys
- Dominant language
- TypeScript
- Stars
- 133k
- Forks
- 19.9k
- Avg merge
- 18h 46m
- Merged PRs (30d)
- 26
Description
## Summary
The Codex-hosted `gstack-design-shotgun` skill still routes visual generation through gstack's `design` binary (`$D generate`). That makes Codex users provide an OpenAI API key even though Codex already has a native `image_gen` tool available in the host.
## Current behavior
In the Codex-generated skill, `design-shotgun` still includes the normal design-binary flow:
- run `DESIGN SETUP`
- resolve `$D`
- ask variant subagents to run `$D generate`
- rely on `design/src/auth.ts` to find `~/.gstack/openai.json` or `OPENAI_API_KEY`
That path can fail or bill the wrong account:
- no gstack OpenAI key configured
- cwd `.env` contains `OPENAI_API_KEY`
- Codex design binary path resolution hits the existing fallback-path problem from #1159
## Expected behavior
When the skill name is `gstack-design-shotgun` / host is Codex, the skill should call Codex's native `image_gen` tool directly for each variant.
Expected Codex path:
1. Build the same design brief and variant directions.
2. Use `image_gen` directly to generate each visual variant.
3. Save or copy returned images into `~/.gstack/projects/$SLUG/designs//variant-A.png`, etc.
4. Present the images inline and collect feedback.
5. Do not call `$D generate` and do not require `OPENAI_API_KEY`.
## Why this matters
Codex users have an image generation capability through the host, not through gstack's OpenAI key chain. Requiring another OpenAI key adds setup friction and can accidentally use a project `.env` key. It also makes the advertised Codex skill behave like the Claude-hosted skill instead of using the host-native tool.
## Notes
I tested the host `image_gen` path locally from Codex and it can generate a multi-variant UI mockup without any gstack `design` binary or OpenAI API key setup. The generated image was saved under `~/.codex/generated_images/...` as expected.
This is related to, but not the same as:
- #1159: Codex design workflows can report `DESIGN_NOT_AVAILABLE` due to path/install-surface drift
- #990: support non-OpenAI image providers in `design`
- #1248: `design` can pick up `OPENAI_API_KEY` from cwd `.env`
- #1771: OpenAI image tool model pairing regression
Contributor guide
Research direction
Start with the Codex-generated gstack-design-shotgun skill and trace its DESIGN SETUP, $D resolution, and variant-generation flow. Compare the existing $D generate path with the host image_gen behavior described here, including output placement under ~/.gstack/projects/$SLUG/designs//; done means Codex variants use image_gen without requiring OPENAI_API_KEY.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100