Codex design workflows report DESIGN_NOT_AVAILABLE due to broken fallback paths + missing design install surfaces
Summary
Codex-hosted design skills can incorrectly report DESIGN_NOT_AVAILABLE even when the design binary exists. The failure comes from a combination of broken fallback path generation and missing design install surfaces in the Codex runtime.
What breaks
There are three linked problems:
- Generated fallback paths in Codex setup blocks prepend
$HOMEto env-var-backed paths like$GSTACK_DESIGNand$GSTACK_BROWSE, producing invalid doubled-home paths. - The Codex global runtime root does not expose
design/dist, so even a correct fallback path has no global design binary to execute. - The repo-local
.agents/skills/gstacksidecar also omitsdesign, so the local-first resolution path fails in repos that have a sidecar install.
Reproduction
Environment:
- gstack current
main - Codex host install
Observed from generated Codex design skill setup:
- fallback for
Dbecomes$HOME$GSTACK_DESIGN/design - fallback for
Bbecomes$HOME$GSTACK_BROWSE/browse
In Codex, those env vars already resolve to absolute paths, so the resulting lookup becomes effectively:
/home/user/home/user/.codex/skills/gstack/design/dist/design/home/user/home/user/.codex/skills/gstack/browse/dist/browse
That causes DESIGN_NOT_AVAILABLE / browse-unavailable behavior even when the underlying binary exists elsewhere.
Root cause
Verified against current source:
scripts/resolvers/design.tsgenerateDesignSetup()builds fallback with$HOME${ctx.paths.designDir...}and$HOME${ctx.paths.browseDir...}generateDesignMockup()builds fallback with$HOME${ctx.paths.designDir...}
scripts/resolvers/browse.tsgenerateBrowseSetup()builds fallback with$HOME${ctx.paths.browseDir...}
hosts/codex.ts- Codex runtime assets include
bin,browse/dist,browse/bin,gstack-upgrade,ETHOS.md, but notdesign/dist
- Codex runtime assets include
setupcreate_codex_runtime_root()does not linkdesign/distcreate_agents_sidecar()does not linkdesign
So this is not just a generated text bug. It is generation drift plus install-surface drift.
Expected behavior
For Codex installs:
- generated setup blocks should resolve valid fallback paths for both design and browse binaries
~/.codex/skills/gstack/design/dist/designshould exist after setup when design workflows are advertised- repo-local
.agents/skills/gstack/design/dist/designshould exist when the sidecar is present design-shotgunpreflight should returnDESIGN_READYwhen the binary is installed
Proposed fix
Fix shared resolver generation for env-var-backed host paths
- update
scripts/resolvers/design.ts - update
scripts/resolvers/browse.ts - do not prepend
$HOMEwhen the host path is already$GSTACK_*
- update
Add
design/distto Codex runtime assets- update
hosts/codex.ts
- update
Patch the actual install helpers in
setupcreate_codex_runtime_root()should linkdesign/distcreate_agents_sidecar()should linkdesign
Add regression coverage for:
- Codex host asset manifest includes
design/dist - generated Codex design setup has valid
DandBfallbacks - generated Codex browse setup does not emit
$HOME$GSTACK_BROWSE - setup helper coverage for both global runtime root and repo-local sidecar
- Codex host asset manifest includes
Why this matters
Right now Codex design workflows degrade into fallback not because the feature is optional, but because the generated/install paths are broken. That makes the host integration look unreliable even when the underlying binary exists.
I can send a PR for this from a fork if the maintainers want the fix bundled with regression tests.
Source: garrytan/gstack