Skip to content

fix(factory): isolate restricted harness tools - #2

Merged
tmill313 merged 10 commits into
fix/codex-swarm-structured-outputfrom
codex/factory-runtime-policy-backport-v2
Aug 21, 2026
Merged

tmill313 merged 10 commits into
fix/codex-swarm-structured-outputfrom
codex/factory-runtime-policy-backport-v2

Conversation

@tmill313

Copy link
Copy Markdown
Owner

Summary

  • propagate explicit sender/config tool restrictions across the plugin-harness handoff
  • disable Codex native shell, environments, hooks, and inherited MCP while preserving policy-filtered dynamic tools
  • require plugin harnesses to certify exact enforcement; cover Copilot's native ask_user sibling surface

Root cause

OpenClaw already filtered its dynamic tool catalog for toolsBySender, but the normal plugin-harness path did not tell Codex that the conversation was restricted. Codex therefore received the filtered factory_intake tool and its separate native shell/environment surface at the same time.

This adapts upstream commit 409fb7abcac to the pinned factory runtime without pulling thousands of unrelated upstream commits into the custom factory branch.

Verification

  • node scripts/run-vitest.mjs src/agents/harness/selection.test.ts extensions/codex/src/app-server/dynamic-tool-build.test.ts extensions/codex/src/app-server/run-attempt.test.ts extensions/copilot/src/attempt.test.ts — 444 passed
  • pnpm plugin-sdk:api:gen
  • pnpm plugin-sdk:surface:check reaches the branch's pre-existing export budget failure (4843 > 4834); this patch changes a field on an existing export, not the export count
  • local tsgo:core and tsgo:extensions both reach the branch's pre-existing packages/terminal-core/src/ansi.ts:194 argument-count failure
  • git diff --check

Scope

Production delta: +76/-21. The added surface is the explicit security invariant and its Codex/Copilot enforcement; tests are +132/-1.

@tmill313
tmill313 merged commit e9e66cd into fix/codex-swarm-structured-output Aug 21, 2026
164 of 177 checks passed
@tmill313
tmill313 deleted the codex/factory-runtime-policy-backport-v2 branch August 21, 2026 20:24
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