Skip to content

Give Codex a NodeSpace plugin, and finish the harness scenario on Codex, Pi and Antigravity #3748

Closed

Description

@malibio

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
  • hooks and plugins are both stable and on by default in 0.162.1.
  • A Codex plugin bundles hooks in hooks/hooks.json (or a hooks entry 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.ts assumes 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 PreToolUse command has to be fast enough to run before each shell command and edit.

Acceptance criteria

  • nodespace skill install gives Codex a plugin (or hooks) in addition to the skill, and nodespace uninstall removes 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 /hooks trust 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 rpc to keep one process across prompts); agy -p --input-format stream-json --output-format stream-json.
  • nodespace skill install with 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 on PATH (the desktop app passes the installer its augmented PATH).

Refs #3721

Activity

  1. changed the title [-]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[/+] on Oct 12, 2026
  2. malibio commented on Oct 13, 2026

    @malibio
    CollaboratorAuthor

    Frontend: 326 files, 5899 tests passed

  3. self-assigned this
    on Oct 13, 2026
  4. malibio commented on Oct 13, 2026

    @malibio
    CollaboratorAuthor

    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.

  5. malibio commented on Oct 13, 2026

    @malibio
    CollaboratorAuthor

    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.

  6. 8 remaining items

  7. malibio commented on Oct 13, 2026

    @malibio
    CollaboratorAuthor

    Pi column (Pi 1.2.0, openrouter Sonnet, extension and skill from this checkout's installer, PR #3793)

    Case Result
    Probe: project and skills known with no command pass: project, 26 skills, the commit standard; status line NodeSpace: Widget
    Skill edited mid-session pass: the next prompt carried the change note; the agent said what it did not know
    Task finished elsewhere pass: the next tool call was refused with the change; the agent stopped and did not move it to review
    Own writes not mistaken for foreign pass

    Found 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 $id was 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.

  8. malibio commented on Oct 13, 2026

    @malibio
    CollaboratorAuthor

    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).

    Claude Code 2.1.296, plugin OpenCode 1.18.35, plugin Codex 0.162.1, hooks Pi 1.2.0, extension Antigravity 1.3.4, skill and block only
    Model Claude Sonnet 5.5 big-pickle Codex's own OpenRouter Sonnet Antigravity's own
    Probe: project and skill list known with no command Yes Yes Yes Yes No: project guessed from the folder name, skills "unknown"
    Skill edited mid-session is announced Yes Yes Yes, on the next prompt Yes, on the next prompt No: said "No" when asked, citing its earlier read
    Task finished elsewhere stops the session Yes: first tool call after the soak refused Yes: the edit after the soak refused Yes: next write refused by PreToolUse Yes: next tool call refused, agent stopped Not reached: stopped to ask which task to take
    Own writes not mistaken for foreign Yes (no false refusal in the run) Yes (no false refusal in the run) Yes Yes Not applicable: no watch
    Status line NodeSpace: Widget not recorded None in Codex; a systemMessage at session start, not yet seen in the UI NodeSpace: Widget No hook for it

    Control 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

    Still open

    • Antigravity plugin: recommended and filed as Give Antigravity a NodeSpace plugin: hooks for project, skill list and refusal #3777, with the hook events, the conversation id and the response shapes it needs.
    • Installer detection: nodespace skill install with 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.
    • Codex status duty: Codex has no status line; the systemMessage at session start has not been observed in its UI, so "not available" is not yet recorded with evidence.
    • Codex install criteria not run in a live session: nodespace uninstall removing the hooks, and the "hooks not trusted" session still getting the instructions block, are covered by tests, not by a live run.
  9. malibio commented on Oct 13, 2026

    @malibio
    CollaboratorAuthor

    Codex status duty: settled

    Codex has no status line, but a hook's systemMessage is shown. Seen in an interactive Codex 0.162.1 session started in a checkout, with the hooks trusted through /hooks:

    ↳ Hook · NodeSpace: unreachable (Error: Could not connect to nodespaced at /Users/malibio/.nodespace/daemon.sock.)
    

    That is the SessionStart hook's systemMessage (the daemon was not running, so the reach text was the unreachable line; a reached session puts NodeSpace: <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:

    • Reinstalling over the earlier handler form (the double-quoted script path) leaves both forms in hooks.json; only this machine ever had the old one, so it was removed by hand.
    • Codex runs a hook only after /hooks trust, 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions