Skip to content

feat(v1): add MiniMax Code harness - #2393

Open
hetaoBackend wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
hetaoBackend:feat/mcode-headless-harness
Open

feat(v1): add MiniMax Code harness#2393
hetaoBackend wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
hetaoBackend:feat/mcode-headless-harness

Conversation

@hetaoBackend

@hetaoBackend hetaoBackend commented Aug 18, 2026

Copy link
Copy Markdown

Summary

  • add a built-in v1 mcode harness backed by mcode exec
  • pin @minimax-ai/code to 0.1.4 and reuse the shared Node.js installer
  • expose MiniMax Code's built-in read, write, edit, bash, grep, and glob tools in an isolated per-rollout data directory
  • register one agentic Docker E2E placement

Interception and isolation

MiniMax Code 0.1.4 requires a literal custom-provider key in its config. The harness keeps only a harmless placeholder there and uses a Node preload to:

  • read and immediately unlink a mode-0600 one-use interception credential before the CLI module loads
  • remove the credential path, endpoint, and NODE_OPTIONS from the process environment before model-directed tools can run
  • inject the bearer only for the exact verifiers interception origin/path
  • suppress MiniMax Code's metrics batch requests locally so rollout metadata is not sent outside the eval

The harness also uses a rollout-local MINIMAX_DATA_DIR and disables persona, memory, external skills, delegation, web search, and other unrelated product features.

Scope

This integration intentionally uses headless mcode exec rather than ACP because the current ACP server performs an additional conversation-title model call. MCP URLs and cross-segment resume are not advertised by this harness.

Validation

  • uv run --frozen ruff check verifiers/v1/harnesses/mcode verifiers/v1/harnesses/__init__.py tests/v1/conftest.py tests/v1/test_e2e.py
  • uv run --frozen pytest --collect-only -q tests/v1/test_e2e.py -m mcode
  • uv run --frozen pytest -q tests/v1 -m 'not e2e' (70 passed)
  • loader/config assertions for the built-in mcode harness
  • black-box mcode 0.1.4 regression against a mock OpenAI-compatible endpoint, including a real bash tool call
  • verified the interception endpoint received the real bearer while the model-controlled shell saw the secret file absent and VF_MCODE_* / NODE_OPTIONS unset
  • audited effective fetch destinations: only the local interception endpoint was reached; metrics requests were handled locally

The live model-backed Docker E2E was not run locally because PRIME_API_KEY is not configured.

Note

Add MiniMax Code harness for headless agent execution

  • Adds MCodeHarness and MCodeHarnessConfig in harness.py, implementing the Harness interface for running MiniMax Code CLI in headless mode against a custom OpenAI-compatible endpoint with bearer auth.
  • Installs the @minimax-ai/code npm package at a pinned version (0.1.4) on first use, guarded by a lockfile; subsequent runs reuse the installation.
  • Injects auth headers and suppresses telemetry via a Node.js preload module that intercepts fetch, reads a one-use on-disk secret, and scrubs related env vars.
  • Adds an mcode pytest marker and a docker-based e2e parameterization entry in AGENTIC_PLACEMENTS.
  • Risk: requires Node.js present in the execution environment; MCP URLs are explicitly rejected and will fail fast.

Macroscope summarized bcf6f24.

@hetaoBackend
hetaoBackend force-pushed the feat/mcode-headless-harness branch from 17de049 to bcf6f24 Compare August 19, 2026 00:59
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