mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-23 00:21:14 +01:00
Codex loads office-hours, plan-design-review and gstack-upgrade again, and knows when it runs unattended (GST-3161) (#4510)
On Codex, naming office-hours, plan-design-review or gstack-upgrade loaded nothing, because setup left a second copy of each that Codex listed twice; on macOS and Linux setup now links those copies, and re-running setup or upgrading fixes an existing install. Skills started under `codex exec` now report `SESSION_KIND: headless` instead of `interactive` (also on slim Linux images without `ps`), Codex reviewers start without the parent's conversation (`fork_turns: "none"`), and the docs stop saying Codex has no hooks. Nothing to do after merge; Codex users pick it up on their next upgrade. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/specialist-batched#1 reader=testing
This commit is contained in:
1 parent
b702243859
commit
ed4086e262
15 files changed
+256
-25
No files matched your search
@@ -32,7 +32,8 @@ The off switch is for people. The text the Stop hook shows the model never menti
|
||||
| Host | Routing hook | Contract Stop hook | Destructive-command check | Notes |
|
||||
|---|---|---|---|---|
|
||||
| Claude Code | yes | yes | yes | Registered in `~/.claude/settings.json` by `./setup` |
|
||||
| Codex, OpenCode, Cursor and other hosts | no | no | no | No hook support. `gstack-skill-contract check` still works on a Claude Code transcript |
|
||||
| Codex | no | no | no | Not ported yet. Codex CLI 0.170 runs hooks (`SessionStart`, `UserPromptSubmit`, `PreToolUse`, `Stop` and more, from `$CODEX_HOME/hooks.json`), but `./setup --host codex` registers none of these three there |
|
||||
| OpenCode, Cursor and other hosts | no | no | no | gstack registers no hooks on these hosts. `gstack-skill-contract check` still works on a Claude Code transcript |
|
||||
|
||||
## Routing
|
||||
|
||||
|
||||
+10
-1
@@ -7,13 +7,22 @@ kind changes, which files a run writes, how the parent decides whether the run
|
||||
finished, and how it reads the result without reading any markdown.
|
||||
|
||||
The session kinds are: `interactive` (a human answers prompts), `headless`
|
||||
(`GSTACK_HEADLESS`, `CI`, the eval harness; a question BLOCKs), `spawned`
|
||||
(`GSTACK_HEADLESS`, `CI`, the eval harness, `codex exec`; a question BLOCKs), `spawned`
|
||||
(an orchestrator subagent; the recommended option is auto-chosen) and
|
||||
`unattended` (this page). `unattended` is honored only as the explicit
|
||||
`GSTACK_SESSION_KIND=unattended` override, which outranks `GSTACK_HEADLESS`
|
||||
so a parent can drive a run inside CI. Nothing in the test or eval harness sets
|
||||
it, so `headless` keeps its BLOCK semantics.
|
||||
|
||||
On Codex CLI, `gstack-session-kind` reports `headless` for a skill started
|
||||
under `codex exec` (or its alias `codex e`, or `codex review`) and
|
||||
`interactive` in the Codex TUI. Codex gives tool shells the same environment
|
||||
(`CODEX_THREAD_ID`, `CODEX_CI=1`, no TTY) in both, so the helper reads the
|
||||
subcommand of the nearest `codex` process instead: exec runs tool shells
|
||||
itself, and the TUI runs them under its `codex app-server` daemon. Conductor's
|
||||
markers still win, as they do for Claude Code. A Codex run that a parent agent
|
||||
drives still sets `GSTACK_SESSION_KIND=unattended` itself.
|
||||
|
||||
## What the session kind changes
|
||||
|
||||
`gstack-skill-start` prints `SESSION_KIND: unattended`,
|
||||
|
||||
Reference in new issue
Block a user