Repository navigation
Description
Problem
nodespace skill install gives Codex the skill and an instructions block, and nothing else. A session then receives only what the agent asks for. In the scenario run for #3721, a session given exactly what Codex gets (Claude Code with the plugin removed, same model as the plugin run) fetched the skill list, fetched the task's context and claimed the task before editing, but:
- it did not work out which project the checkout belongs to;
- it did not notice a skill edited mid-session, even when asked about the standard again;
- it was not stopped when its task was finished elsewhere, and kept editing until a later graph write was refused for a stale version.
Claude Code and OpenCode, each with its plugin, delivered all three. Results table: #3721 (comment)
Why a plugin is possible
Checked against Codex 0.162.1 (codex features list, the binary's event names) and the hooks documentation (https://learn.chatgpt.com/docs/hooks). Not yet run in a live session.
| Plugin duty (ADR-093) | Codex hook |
|---|---|
| Session-start check, project resolution, orientation and skill list | SessionStart: stdout or hookSpecificOutput.additionalContext is added as developer context |
| Note when the skill list changes | UserPromptSubmit: additionalContext on every prompt |
| Refuse tool calls once the watched item is finished elsewhere | PreToolUse: permissionDecision: "deny" with a reason; fires for shell commands (Bash), file edits (apply_patch, also matched as Edit / Write) and MCP tools |
| Status | No hook found for it; to be settled in this issue |
hooksandpluginsare both stable and on by default in 0.162.1.- A Codex plugin bundles hooks in
hooks/hooks.json(or ahooksentry in.codex-plugin/plugin.json); hooks can also live in~/.codex/hooks.json.
Constraints found
- Hooks are commands, not a loaded module. Each event runs a command, so nothing stays in memory between events. The session's state (the skill list last announced, the item being watched) has to be kept in a file per session or asked of the daemon each time.
packages/skill/plugins/shared/nodespace-session.tsassumes a long-lived object today. - Hooks must be trusted by the user. Codex does not run a non-managed hook until it is reviewed through
/hooks, and installing a plugin does not trust its hooks. The installer cannot complete this step, so it must say what the user has to do, and a session whose hooks are not trusted must still get the instructions block. - A hook runs on every tool call. The
PreToolUsecommand has to be fast enough to run before each shell command and edit.
Acceptance criteria
-
nodespace skill installgives Codex a plugin (or hooks) in addition to the skill, andnodespace uninstallremoves it. - A Codex session started in a checkout of a known project receives the project, the orientation, the consent rules and the skill list without asking.
- A skill edited mid-session is announced on the next prompt.
- Once the task being worked on is finished elsewhere, the next shell command or file edit is refused with the reason.
- The installer's output states the
/hookstrust step, and a session with untrusted hooks still gets the instructions block. - Session state survives between hook invocations without a long-lived process, and the shared session logic is reused, not copied.
- Whether Codex has a place for the plugin's status duty is settled and recorded: implemented, or stated as not available with the evidence.
- A Codex driver is added to
scripts/eval/harness/and the scenario from Confirm what each coding harness actually receives from NodeSpace #3721 is run against the plugin, with the Codex column of the results table filled from that run.
Remaining harnesses, carried over from #3721
#3721 was closed with Claude Code and OpenCode run. What it still owed is tracked here.
- Pi: a driver is added to
scripts/eval/harness/and the scenario is run against the existing Pi plugin; the Pi column is filled, and each defect found is fixed or filed with a reproduction. (Checked so far: the installed release, 1.1.0, has the API the extension uses; a session stops at "No API key found".) - Antigravity: a driver is added and the scenario is run with what the installer writes today (skill and instructions block); the Antigravity column is filled.
- Antigravity: its hook or plugin support is checked, and a recommendation is recorded with the evidence. Where the answer is to build a plugin, it is filed as its own issue.
- The completed results table is posted on this issue.
Notes
- The live runs need an account for each of Codex, Pi and Antigravity; the CLIs are installed on the test machine, with NodeSpace's files in each.
- Likely driver commands:
codex exec --json;pi -p --mode json(or--mode rpcto keep one process across prompts);agy -p --input-format stream-json --output-format stream-json. nodespace skill installwith no agent named reports a freshly installed Pi or Antigravity as "not detected" until it has been started once; naming the agent installs correctly. Decided: it was a defect, fixed by also finding an agent by its command onPATH(the desktop app passes the installer its augmentedPATH).
Refs #3721
Activity
[-]Give Codex a NodeSpace plugin: push the project, skill-list changes and the finished-elsewhere stop through its hooks[/-][+]Give Codex a NodeSpace plugin, and finish the harness scenario on Codex, Pi and Antigravity[/+]malibio commentedon Oct 13, 2026
Frontend: 326 files, 5899 tests passed
malibio commentedon Oct 13, 2026
Codex column, from a live run (Codex 0.162.1, hooks installed by the installer and trusted through /hooks, isolated daemon, fixture from #3721). Probe: named the project and the skill list with no command. Standard edited mid-session: announced on the next prompt, naming the new rule. Task finished elsewhere: the next write was refused by the PreToolUse hook with the reason (version 2 to 4, in_progress to done) and the session stopped. The session's own writes were not mistaken for foreign ones. Findings: (1) hooks fire as documented, session_id equals CODEX_THREAD_ID, which also reaches shell commands; (2) a hook cannot set a command's env, so the CLI now names a write journal after CODEX_THREAD_ID when NODESPACE_WRITE_JOURNAL is unset; (3) SessionEnd fires per codex exec process; (4) the sandbox needs the NodeSpace home and the checkout .git as writable roots, given as real paths on macOS. Not yet done: Pi and Antigravity drivers and runs (Pi has no ready provider credentials), Antigravity hook research, and the status duty: Codex has no status line, only a systemMessage at session start, not yet observed in the UI.
Give Codex NodeSpace hooks and name its write journal from the thread…
Address review: keep Codex thread state across resume, harden the hoo…
Address re-review: keep and touch the continued thread's state (refs #…
WIP: Codex hooks, state persistence in the shared session, Codex driv…
Give Codex NodeSpace hooks and name its write journal from the thread…
Address review: keep Codex thread state across resume, harden the hoo…
Address re-review: keep and touch the continued thread's state (refs #…
Give Codex NodeSpace hooks, and run the harness scenario on Codex (refs
Address review: a fail-closed approver, real trace shapes, denied tur…
malibio commentedon Oct 13, 2026
Antigravity column (CLI 1.3.4, live run with the skill and instructions block the installer writes today, isolated daemon, #3721's fixture). Probe: named the project from the workspace folder's name (widget), not from the graph; said 'unknown' for the skills. Skill edited mid-session: not noticed; asked whether anything changed it answered 'No', citing its earlier read of the standard (confidently wrong). Task finished elsewhere: not reached: the session listed the ready tasks across projects and stopped to ask which to take, as the procedure says. Hooks recommendation: Antigravity supports them (SessionStart, PreInvocation, PreToolUse, PostToolUse, Stop; workspace .agents/hooks.json or ~/.gemini/config/hooks.json); a logging hook saw conversationId, toolCall.name and args.CommandLine, and ANTIGRAVITY_CONVERSATION_ID is in the environment of the agent's own commands. PreToolUse must answer with a decision, PostToolUse exactly {}. Build a plugin: filed as #3777 with the evidence and acceptance criteria. Status duty: no hook found for it. Driver and approver: PR #3778.
8 remaining items
malibio commentedon Oct 13, 2026
Pi column (Pi 1.2.0,
openrouterSonnet, extension and skill from this checkout's installer, PR #3793)NodeSpace: WidgetFound by the run, fixed in the same PR in the shared session module and in the Claude Code plugin's copy: an agent that wrote
id=<uuid>; nodespace node context $idwas not watched, because the invocation's id was the text$id. Without the fix the finish was caught only by the CLI's version check at the write.Still open on this issue: the one results table across all five harnesses (Claude Code, OpenCode, Codex, Pi, Antigravity), whether "not detected until started once" is a defect for Pi and Antigravity, and the Codex status line not yet seen in its UI.
Add a Pi scenario driver, and read a variable the agent set earlier i…
Address review: Claude Code parser parity, driver timers and failures…
Add a Pi scenario driver and watch items read through a shell variabl…
malibio commentedon Oct 13, 2026
Results across the five harnesses
The scenario from #3721, run live in each harness against an isolated daemon, through
scripts/eval/harness/run.ts. The Claude Code and OpenCode columns are from #3721's table; Codex, Antigravity and Pi are from the comments above (PRs #3775, #3778, #3793).big-picklePreToolUseNodeSpace: WidgetsystemMessageat session start, not yet seen in the UINodeSpace: WidgetControl from #3721, for reference: Claude Code with the instructions block only (no plugin) failed the same three cases as Antigravity does.
What the runs found
CODEX_THREAD_IDwhenNODESPACE_WRITE_JOURNALis unset (Give Codex NodeSpace hooks, and run the harness scenario on Codex (refs #3748) #3775).id=<uuid>; nodespace node context $idwas not watched, because the plugin saw the text$id. A plain assignment earlier in the line now supplies the value, in the shared module and in the Claude Code plugin's copy (Add a Pi scenario driver and watch items read through a shell variable (refs #3748) #3793).Still open
nodespace skill installwith no agent named reports a freshly installed Pi or Antigravity as "not detected" until it has been started once; naming the agent installs correctly. Not yet decided whether that is a defect.systemMessageat session start has not been observed in its UI, so "not available" is not yet recorded with evidence.nodespace uninstallremoving the hooks, and the "hooks not trusted" session still getting the instructions block, are covered by tests, not by a live run.Address review: give the installer the augmented PATH, isolate spawne…
Give the installer the augmented PATH where it is launched, not where…
Keep the machine's own agents out of the installer tests' PATH (refs #…
Detect an installed agent by its command on the path as well as its f…
Address review: give the installer the augmented PATH, isolate spawne…
Give the installer the augmented PATH where it is launched, not where…
Keep the machine's own agents out of the installer tests' PATH (refs #…
Detect an installed agent by its command on the path as well as its f…
malibio commentedon Oct 13, 2026
Codex status duty: settled
Codex has no status line, but a hook's
systemMessageis shown. Seen in an interactive Codex 0.162.1 session started in a checkout, with the hooks trusted through/hooks:That is the SessionStart hook's
systemMessage(the daemon was not running, so the reach text was the unreachable line; a reached session putsNodeSpace: <project>through the same field). The status duty is implemented there, and the criterion is met.Two things the run showed, both on the install side and neither a regression:
hooks.json; only this machine ever had the old one, so it was removed by hand./hookstrust, and a session already running when hooks are trusted gets its first events on the next prompt.All acceptance criteria on this issue are now met: #3775 (Codex), #3778 (Antigravity driver and recommendation, plugin filed as #3777), #3793 (Pi, and the shell-variable fix) and #3794 (installer detection).