Skip to content

Codex/OpenCode ssh/WSL turns skip pre-exec classifyTool; deny-tier tools run #835

Closed

Description

@currentbits

Follow-up from #834 / #821 / #813.

runner.js still skips isolated CODEX_HOME PreToolUse and OPENCODE_CONFIG_DIR when crossesBoundary(project) (ssh/WSL). Cursor and Kimi now deploy a remote overlay (#834); Grok already does (#821). Codex (hooks.json + --dangerously-bypass-hook-trust) and OpenCode (plugin in OPENCODE_CONFIG_DIR) have no remote pre-exec seam — a deny-tier tool on an ssh/WSL turn can run before the stream notice.

Seams (do not invent control_request)

  • Codex: remote $HOME/.solenta/codex-homes/<threadId> + wrap env CODEX_HOME= via electron/ssh.js boundaryArgv. Keep --dangerously-bypass-hook-trust and -c features.hooks=true on argv (they already survive wrapCommand).
  • OpenCode: remote $HOME/.solenta/opencode-guardrails/<threadId> + wrap env OPENCODE_CONFIG_DIR=.
  • Reuse electron/remote-overlay.js writeRemoteOverlay / probeRemoteHome (add the module if this tree does not have it yet).

Must not weaken

  • Local Codex CODEX_HOME overlay
  • Local OpenCode OPENCODE_CONFIG_DIR plugin
  • Claude control_request

Tests

Must fail if a deny-tier tool on a crossesBoundary Codex or OpenCode turn produces no block.

Activity

  1. added
    bug
    plan:doing
    on Sep 2, 2026
  2. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Implemented on coder/fork-fork-fork-fork-solenta-guardrail-de-016312.

    Codex and OpenCode ssh/WSL turns now deploy a remote overlay and prefix wrap env (CODEX_HOME / OPENCODE_CONFIG_DIR) via boundaryArgv. Tests: electron/test/codex-guardrail-remote.test.js and electron/test/opencode-guardrail-remote.test.js fail if a deny-tier tool on a crossesBoundary turn produces no block.

    Local overlays and Claude control_request unchanged. Workflow skipOverlay still skips (out of scope).

  3. added
    plan:done
    and removed
    plan:doing
    on Sep 2, 2026
  4. added
    plan:doing
    plan:done
    and removed
    plan:done
    plan:doing
    on Oct 3, 2026
  5. currentbits commented on Oct 3, 2026

    @currentbits
    OwnerAuthor

    Verified on main (2026-10-03 board cleanup). Codex and OpenCode ssh/WSL turns deploy a remote guardrail overlay and pass CODEX_HOME / OPENCODE_CONFIG_DIR through resolveSpawn: electron/runner.js:5094-5104 and 6200-6206. Covered by electron/test/codex-guardrail-remote.test.js and opencode-guardrail-remote.test.js. Note: hook trust is now written into the overlay config.toml rather than passed as --dangerously-bypass-hook-trust (#1309/#1311).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions