Skip to content

Harden Grok subagent lifecycle and isolation - #1

Merged
Walvez merged 2 commits into
mainfrom
codex/harden-grok-subagent
Jul 16, 2026
Merged

Harden Grok subagent lifecycle and isolation#1
Walvez merged 2 commits into
mainfrom
codex/harden-grok-subagent

Conversation

@Walvez

@Walvez Walvez commented Jul 16, 2026

Copy link
Copy Markdown
Owner

What changed

  • filter the Grok child-process environment and allow explicit opt-in passthrough
  • canonicalize repository and linked-worktree paths
  • correct MCP annotations and protocol-version negotiation
  • require renewed write-scope confirmation for worker follow-ups
  • make cancellation return sessions to idle and terminate failed or timed-out processes
  • expand secret-shaped text redaction
  • raise the supported runtime to Node.js 22 and test Node.js 22/24 in CI
  • add deterministic tests for security boundaries, lifecycle behavior, protocol metadata, and worktree guards

Why

The initial release had strong sandbox and worktree boundaries, but several implementation details could reject valid macOS worktrees, inherit unrelated host credentials, misrepresent MCP side effects, or leave failed agents occupying process slots. The previous tests mostly covered package layout and tool discovery, so these paths lacked regression coverage.

Validation

  • npm test
  • npm run test:e2e
  • git diff --check

The authenticated E2E test confirmed the filtered environment still supports the local Grok login and a real read-only ACP session.

@Walvez
Walvez marked this pull request as ready for review July 16, 2026 17:26
@Walvez
Walvez merged commit 1e0a064 into main Jul 16, 2026
4 checks passed
@Walvez
Walvez deleted the codex/harden-grok-subagent branch August 3, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant