./setup --host codex also exposes gstack to Claude Code
- Dominant language
- TypeScript
- Stars
- 133k
- Forks
- 19.9k
- Avg merge
- 18h 46m
- Merged PRs (30d)
- 26
Description
## Summary
Running gstack's documented Codex-specific setup still makes gstack available to Claude Code when Claude Code is installed on the same machine.
I have reproduced this multiple times with:
```bash
./setup --host codex
```
I want gstack installed only for Codex. I did not use `--host auto`, and I did not opt into the Claude Code host.
## Expected behavior
An explicit host selection should be exclusive:
```bash
./setup --host codex
```
should:
- install and register gstack only for Codex;
- leave Claude Code's skills, hooks, settings, and discovery paths unchanged;
- avoid exposing the Codex installation through any shared path that Claude Code also discovers;
- ignore the presence of the `claude` executable because `--host auto` was not selected; and
- preserve the Codex-only selection on later setup or upgrade runs.
The README distinguishes `./setup --host codex` from `./setup --host auto`, so the explicit flag should provide a reliable isolation boundary.
## Actual behavior
Claude Code is installed on the same Windows machine. After running:
```bash
./setup --host codex
```
gstack is also installed, registered, or otherwise discoverable in Claude Code.
This has happened across multiple installation attempts. Removing gstack from Claude Code after setup is not a durable workaround because rerunning setup or upgrading may recreate the unwanted integration.
## Steps to reproduce
1. Install both Codex and Claude Code on the same machine.
2. Confirm that both `codex` and `claude` are available on `PATH`.
3. Clone gstack.
4. Run:
```bash
./setup --host codex
```
5. Inspect the skills available to Claude Code.
6. Observe that gstack is also available there, despite the explicit Codex host selection.
## Impact
Codex and Claude Code are separate environments in my workflow, with intentionally different tools and skills. The current behavior means I cannot maintain a reliable Codex-only gstack installation.
Manually removing the Claude Code integration is fragile:
- it is unclear whether discovered files are independent copies, links, or shared state;
- deleting a shared target may break the Codex installation;
- every setup or upgrade may require another cleanup; and
- I must audit Claude Code after each update to confirm gstack was not restored.
## Requested fix
Make `--host codex` authoritative and exclusive for the entire installation and upgrade lifecycle.
Auto-detection of Claude Code should occur only with:
```bash
./setup --host auto
```
No later migration, hook setup, shared-path registration, or upgrade step should enable Claude Code after `--host codex` was explicitly selected.
It would also help if setup printed the effective installation plan:
```text
Selected host: Codex
Will install: ~/.codex/skills/...
Will not modify or expose skills to: ~/.claude/...
```
## Acceptance criteria
- On a machine with both CLIs installed, `./setup --host codex` leaves Claude Code unchanged.
- Claude Code does not discover any gstack skills from the Codex installation.
- No Claude Code settings or hooks are added or modified.
- Codex receives the complete supported gstack installation.
- Setup and upgrades retain the Codex-only host selection.
- A regression test covers a machine where both `codex` and `claude` are present on `PATH`.
## Environment
- Windows 11
- Git Bash
- Both Codex and Claude Code installed and available on `PATH`
## Related issues
- #1585 discusses recommended multi-host installation locations, but not failure of an explicit Codex-only selection.
- #1925 discusses upgrade drift across hosts; this report concerns unwanted Claude Code exposure after explicitly selecting only Codex.
Contributor guide
Research direction
Start by tracing ./setup --host codex and the README's host-selection documentation, then reproduce the setup on Windows with both codex and claude on PATH. Verify how installation, registration, upgrades, and shared discovery paths are handled. Done means Codex receives the complete installation while Claude Code's files, settings, hooks, and discovery remain unchanged, with a regression test covering both CLIs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, typescript
- Domain
- cli, developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100