Skip to content

feat(claude_code_agent): accept MCP tool grants in sandbox sessions - #6349

Open
adil-a wants to merge 11 commits into
adasif/harbor-always-grant-task-mcpfrom
adasif/claude-code-mcp-grants
Open

adil-a wants to merge 11 commits into
adasif/harbor-always-grant-task-mcpfrom
adasif/claude-code-mcp-grants

Conversation

@adil-a

@adil-a adil-a commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Standalone PR on main, depending on no open PR. A follow-up PR (#6350) builds stdio and SSE MCP grants on this. The
always-grant-task-MCP PR (#6292) merges cleanly with it but removes task_mcp_grants, which this PR's README names in
its Harbor sentence: whichever merges second updates or drops that sentence. The Claude Code/Codex task-skills PR
(#6293) touches the same files: whichever merges second rebases.

What does this PR do?

Claude Code sandbox sessions refused every required tool grant, so a Harbor task with granted MCP servers, or a
Resources Server serving tools over MCP, could not run on Claude Code (Codex, OpenCode, Hermes and Pi take them). A
sandbox session now takes MCPToolAccess grants (streamable HTTP), required and optional.

  • Config. Each grant becomes an http server (grant name, URL, headers with the session token) in the session's
    mcp.json, beside the static mcp_config servers, passed with --mcp-config (works under --bare).
  • Seed refusals (422): a required direct_http grant; a grant whose tool names collide with another grant's or a
    static server's (Claude Code turns my.server and my_server both into mcp__my_server__<tool>; checked on
    2.1.292); a required grant under network_access: model_only. model_and_tools, refused before, now opens each
    grant's host.
  • Required grants. The CLI has no setting that makes a server required. In print mode it tries each server,
    writes its init event with each server's status, then sends its first model request; a server still connecting
    is pending. 2.1.292 waits up to MCP_TIMEOUT (30 s by default); 2.1.108, which the benchmark profile pins, waits
    about 5 s (a constant in its code). Real runs confirmed both.
    • require_mcp_servers.sh (bash) reads the init event as it is written and stops the CLI when a required server
      is not connected.
    • The agent server then checks the init event itself: a required server not connected, or no init event,
      fails the activation with 502 and an agent_startup_failed gap, so the turn is never graded, even if the run
      then timed out. Only an exception, or a timeout before the init event, keeps its cause.
    • An optional server that did not connect becomes an mcp_server_skipped gap.
    • No seed probe: a Compose sidecar resolves only inside the sandbox, and the CLI's mcp_status request answers
      pending without waiting.

Docs: the Claude Code README (new "MCP tool grants" section, network_access), the benchmark profile comments and
the tool-source table in add-or-update-a-harness.mdx. The README's Harbor sentence says that the harbor
Environment Server refuses task_mcp_grants: optional for this harness, which does not declare
supports_task_tool_context, so Harbor tasks run with task_mcp_grants: required.

Issue: none. This is a maintainer decision made while closing the gaps that SkillEvaluator hits on Gym.

Validation

  • pytest -n 8 responses_api_agents/claude_code_agent/tests (repo root, agent venv): 238 passed, 30 of them new in
    test_mcp_grants.py (refusals, mcp.json, statuses, timeouts, the script with a stub CLI). On main's code 28 of
    the 30 fail; the 2 that pass check that an optional grant opens no host under model_only and that a timeout with
    the required server connected stays a timeout.
  • Core tests (tests/unit_tests/agents, docs links, harness profiles, Environment Server compliance, config
    templates, public-API and import checks) pass, except 5 agent tests that fail identically on main, in untouched
    code (local environment). test_process_supervisor[forking_tool] is flaky under -n 8 and passed serially.
  • pre-commit run --files on the touched files: passed (guardwords skipped its check: private catalog unavailable).
    ruff check, ruff format --check and git diff --check: clean.

Rollouts

A hosted GPT model behind an OpenAI-compatible endpoint serves Claude Code through Gym's model server, with
OpenSandbox sandboxes.

Harbor (borrowed sandbox), task_mcp_grants: required. A Compose sidecar serves the MCP tool get_magic_word and
logs calls; the verifier scores 1 only for the right answer plus a logged call.

Case CLI Observed
Sidecar serving 2.1.292 reward 1.0; mcp__magic__get_magic_word returned pineapple; call logged
Grant URL on an unserved port 2.1.292 502 Required MCP servers did not connect before Claude Code's first model request: magic (failed); the script stopped the CLI (exit 143) before its first model request (0 conversation items); nothing graded (retryable)
Sidecar answers initialize after 10 s 2.1.108 502 ... magic (pending); the script stopped the CLI (exit 143), 0 model calls; nothing graded (retryable)
Sidecar answers initialize after 10 s 2.1.292 reward 1.0; call logged (connected within MCP_TIMEOUT)

Agent-owned sandbox, Resources Server grant. example_single_tool_call with expose_tools_over_mcp: true,
granted by single_agent_turn_legacy with resources_tool_transports: [mcp]; CLI 2.1.108 in its own
python:3.12-slim sandbox with model_and_tools. 2 tasks: reward 1.0 on both;
mcp__example_single_tool_call__get_weather returned the server's The weather in <city> is cold.; no agent
observation gaps; sandboxes stopped. Both servers ran on one node, so the allowlist held one host; host-per-grant is
unit-tested.

Optional grant that cannot connect. No shipped Environment Server runs this harness with one: Resources Server
grants are required, and a Harbor run of the unserved-port task with task_mcp_grants: optional (2.1.292) was
refused with a terminal 422 naming supports_task_tool_context. So a driver called the session API (seed,
/ng-rollout/<id>/v1/responses, close) with an optional grant to an unserved port, in an agent-owned
python:3.12-slim sandbox with model_and_tools. On 2.1.108 and 2.1.292: completed with the right answer (391),
no tool calls, gap mcp_server_skipped flaky: failed, sandbox stopped.

The timeout fix has no real run (the script would have to miss the init event, which Gym's configuration cannot set
up); unit tests cover it. The first two Harbor rows ran on the first commit, the rest on the timeout fix; the last
commit changes only comments and docs. The Harbor task copies set workdir = "/app", because Claude Code refuses
the / workdir (a check this PR does not change).

Compatibility and benchmark impact

  • Sessions with grants were refused (required) or ran without the tools (optional); now they get them. Sessions
    without grants are unchanged. model_and_tools is accepted; colliding grant names are a new refusal.
  • On 2.1.108, the profile's version, a required MCP server must connect within about 5 s or the activation fails
    (502, retryable).
  • The benchmark profile keeps network_access: model_only, which refuses a required MCP grant; pairing it with a
    benchmark that serves tools over MCP needs model_and_tools.

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable).
  • Documentation added or updated, or N/A with justification.
  • Pre-commit checks pass locally (pre-commit run --all-files) (so CI lint/format checks pass). Run with --files on the touched files, not --all-files.
  • New source files include the required Apache-2.0 SPDX header.
  • All commits have DCO sign-off (git commit -s) (so the DCO check passes).

🤖 Generated with Claude Code

adil-a and others added 3 commits November 17, 2026 21:11
Claude Code sandbox sessions refused every required tool grant, so a Harbor
task whose MCP servers are granted as required, or a Resources Server that
grants its tools over MCP, could not run on Claude Code.

A session now writes each streamable HTTP MCP grant (required or optional)
into its --mcp-config file as an `http` server with the grant's URL and
headers, next to the static mcp_config servers. The seed refuses, with a 422,
required grants of another kind (direct_http), grants whose Claude Code tool
names (mcp__<server>__<tool>, punctuation read as `_`) would collide with
another grant or a static server, and required grants under model_only.
model_and_tools now opens each grant's host.

Claude Code has no required-server setting: in print mode it tries each server
for up to MCP_TIMEOUT, reports each one's status in its stream-json init event,
then sends its first model request. With required grants the CLI runs under
require_mcp_servers.sh, which stops it when the init event reports a required
server that did not connect. The agent server then checks the init event
itself and fails the activation with a 502 and an agent_startup_failed gap, so
the turn is never graded; an optional server that did not connect is an
mcp_server_skipped gap.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Adil Asif <[email protected]>
…a required MCP server

A timeout used to override the init-event check, so an activation whose init event showed a required MCP server
failed, pending or not listed returned status incomplete with HTTP 200 and was graded. That happens when
require_mcp_servers.sh does not stop the CLI (an init line it does not recognize, a required server the init
event does not list, or a timeout landing before its TERM), and the model then runs out its time without the
required tool.

A timeout now keeps its cause only when the run ended before the init event. Once the init event shows a
required server that did not connect, the activation fails with 502 and an agent_startup_failed gap whether or
not the run then timed out, as OpenCode does with its recorded statuses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Adil Asif <[email protected]>
…P servers

The README and require_mcp_servers.sh said Claude Code waits up to MCP_TIMEOUT (30 s) for its MCP servers before
the init event. That holds for 2.1.292. 2.1.108, which the benchmark profile pins, waits about 5 s in print mode
and has no setting to wait longer. A required server slower than that is pending, so the activation fails. Real
runs with a sidecar that answers initialize after 10 s showed both: 502 "magic (pending)" on 2.1.108, reward 1.0
on 2.1.292.

The README also says that the harbor Environment Server refuses task_mcp_grants: optional for this harness. The
benchmark profile's comments no longer say Claude takes no tool grants; they say that model_only refuses a
required MCP grant and that model_and_tools opens each grant's host.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Adil Asif <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@adil-a

adil-a commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 7d571d8

@adil-a

adil-a commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

/review

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP

LGTM. No concerns found.

I reviewed all 10 changed files and traced the affected session, process-supervision and Environment Server paths. This was a static review; I did not execute tests or independently verify the reported rollouts.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added feature New capabilities, enhancements, or enablement work area:agent Agent harnesses and Responses API agent behavior labels Nov 18, 2026
adil-a and others added 3 commits November 22, 2026 22:46
Conflicts in claude_code_agent (app.py, sandbox.py, README.md) and the
harness table of add-or-update-a-harness.mdx, all from main's
instruction_on_stdin, Harbor system dependencies, client env and the
OpenCode compaction-buffer docs landing next to this branch's MCP grants:

- app.py: main's _run_system_dependencies and this branch's
  _colliding_mcp_server_names both kept; the session env takes main's
  client env and then builds the MCP grant list; _build_command gets
  main's prompt argument (None when the instruction goes on stdin) and
  this branch's --mcp-config path; the activation raises the 502 for an
  unconnected required server before returning main's precomputed
  response.
- sandbox.py: stage_activation keeps main's optional prompt on stdin and
  this branch's events path and require_mcp_servers.sh wrapper.
- README.md and the harness table: both sides' text kept.

require_mcp_servers.sh runs the CLI as a background job, and bash gives
a background job /dev/null as stdin without job control, which would
drop main's instruction_on_stdin prompt whenever a required MCP grant is
present. It now runs the CLI with <&0, and a new test checks that the
wrapper passes stdin through.

Signed-off-by: Adil Asif <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… and the MCP-check payload

Main now reads sandbox.sandbox_id when a session seeds its own sandbox,
which the fake sandbox of owned_seed_mocks lacks. Main's run_runner test
builds a stage_activation payload without the required_mcp_servers key
that stage_activation now pops; the production caller always sends it.

Signed-off-by: Adil Asif <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Adil Asif <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@adil-a

adil-a commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Merged main at 51630ce4f2 into this branch (merge commit 3d46ef9d89, with the conflicts below), added one test
commit (c55fb360a8), then merged main at 15adc22542 (merge commit a96db9200c, new head; no conflicts).

Conflicts in 3d46ef9d89, in claude_code_agent (app.py, sandbox.py, README) and the harness table of
add-or-update-a-harness.mdx, where main's instruction_on_stdin, Harbor system dependencies, client env and
OpenCode compaction-buffer docs landed next to this PR's MCP grants. Both sides are kept:

  • app.py: main's _run_system_dependencies and this PR's _colliding_mcp_server_names; the session env takes
    main's client env, then the MCP grant list is built; _build_command gets main's prompt argument (None when the
    instruction goes on stdin) and this PR's --mcp-config path; the activation raises the 502 for an unconnected
    required server before returning main's precomputed response.
  • sandbox.py: stage_activation keeps main's optional prompt on stdin and this PR's events path and
    require_mcp_servers.sh wrapper.

No textual conflict, but fixed in the merge: require_mcp_servers.sh runs the CLI as a background job, and bash
gives a background job /dev/null as stdin when job control is off. With a required MCP grant that would have dropped
main's instruction_on_stdin prompt. The wrapper now runs the CLI with <&0, and a new test
(test_the_check_passes_the_instruction_on_stdin_to_the_cli) checks that stdin reaches the CLI.

Test fix (c55fb360a8): main now reads sandbox.sandbox_id when a session seeds its own sandbox, which the fake
sandbox of owned_seed_mocks lacked, and main's run_runner test payload lacked the required_mcp_servers key
that stage_activation now pops (the production caller always sends it). Without this commit, 5 tests fail on the
merged tree: 3 in test_mcp_grants.py (AttributeError on sandbox_id) and 2 in test_task_container_sessions.py
(KeyError: 'required_mcp_servers').

These resolutions are the ones the combined end-to-end branch used for this PR (all nine SkillEvaluator-related PRs on
main 51630ce4f2); there, Claude Code called the granted stdio MCP tool in 4 of 4 rows.

Tests on the new head (gym env test, serial, no env.yaml in the tree):

  • claude_code_agent: 329 passed

@adil-a

adil-a commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test a96db92

@adil-a

adil-a commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

/review reset=true

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP

LGTM. No concerns found.

I reviewed all 11 changed files against the admitted base, read the trusted conventions, and traced grant production, session configuration, activation failures and process cleanup. The previous bot review had no findings; I also checked the changes since that revision.

CI checks attached to this head are green for Nemo_CICD_Test, Unit tests / Test, all four core shards, sandbox tests, combined coverage, changed-server tests and lint. The changed-server log reports 329 Claude Code tests passed. CI tested merge commit 76078cd9ad3a607875fa3a2f7a2e04fead5a76f6, not the detached head alone.

The non-blocking diagnostics are still red. Harness conformance reports three failing scenarios with the same count and first failure on the admitted base; I did not compare all three individually. Compliance flags the existing run() method. Neither diagnostic blocks the test aggregate.

Focused probes passed on 766267172432.dkr.ecr.us-east-1.amazonaws.com/gym:main-offline, Python 3.13.14, with imports verified against the admitted checkout:

  • grant_contract_probe.py: Resources and Harbor grants preserve URLs, token headers and required/optional semantics; missing required status is rejected.
  • integration/grant_overlay_probe.py: concurrent sessions keep episode endpoints and tokens isolated without mutating static configuration.
  • probe_mcp_lifecycle.py: byte-split init output stops the CLI with exit 143; the shared supervisor kills a SIGTERM-ignoring CLI and confirms cleanup.

Initial probe import-binding errors were corrected before the passing runs. I relied on CI rather than rerunning its suites, and reviewed but did not independently reproduce the PR’s reported model rollouts.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

Conflict in add-or-update-a-harness.mdx: kept this branch's Claude Code row and main's updated OpenCode row
(`snapshot` added to the permitted opencode_config keys).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Adil Asif <[email protected]>
@adil-a

adil-a commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Merged the latest main (1244484404) to clear a new docs conflict in add-or-update-a-harness.mdx: main added snapshot to the OpenCode row's permitted opencode_config keys; this branch keeps its own rows and takes that key. Claude Code suite passes.

@adil-a

adil-a commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test d55f90e

@adil-a

adil-a commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

/review reset=true

@adil-a
adil-a marked this pull request as ready for review November 24, 2026 00:14
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team November 24, 2026 00:15

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP

LGTM — no concerns found.

I reviewed all 11 changed files and traced grant production, network restrictions, session configuration, activation failures and process cleanup. The previous bot review had no findings; the Claude Code implementation and tests are unchanged since that revision.

Validation: CI attached to this head passed Nemo_CICD_Test, Unit tests / Test, all four core shards, sandbox tests, combined coverage, changed-server tests and lint. The changed-server log reports 329 Claude Code tests passed. CI exercised generated merge commit f919d542, rather than the detached review tree alone.

Purpose-built probes ran on Ubuntu 24.04 with Bash 5.2.21, using the admitted guard and shared runner/supervisor. They confirmed split-write init handling, termination for an unavailable required server, dotted-name matching, stdin preservation, child exit-status propagation, and cleanup of a SIGTERM-ignoring child while retaining partial output. I relied on CI for repository tests and did not independently reproduce the reported model rollouts.

Existing diagnostics: The non-blocking conformance and compliance checks are red. Conformance reports three failing scenarios, with the same count and first failure on the admitted base; I did not compare every failure individually. Compliance flags the existing run() method. Neither produced a finding attributable to this diff.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@yaoyu-33
yaoyu-33 requested a review from weijiac0619 November 24, 2026 02:09
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the needs-review PR is ready for code review and waiting on a reviewer label Nov 24, 2026
@adil-a
adil-a changed the base branch from main to adasif/harbor-always-grant-task-mcp November 24, 2026 03:07
@adil-a
adil-a added this pull request to stack #6689 November 24, 2026 03:07
…ants

The two PRs are now one stack (MCP grants, then Claude Code MCP grants, then stdio and SSE MCP grants), so this
branch carries the one below it and each PR's diff shows only its own changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Adil Asif <[email protected]>
@adil-a

adil-a commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Linked into the MCP grants stack (https://github.com/NVIDIA-NeMo/Gym/stack/6689): always grant a task's MCP servers (#6292) → Claude Code MCP grants (#6349) → stdio and SSE MCP grants (#6350), merged in order. Merged main 17674bec9a bottom up first; this branch now also merges the always-grant branch below it, so its diff against that base shows only its own changes (11 files). Claude Code 329 and Harbor 739 tests pass.

@adil-a

adil-a commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test c37da32

@adil-a

adil-a commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

/review reset=true

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP WITH CARE

One documentation defect: the Harbor instructions recommend a removed setting that prevents configuration from loading. I found no executable defect in the changed paths.

I reviewed all 11 changed files, trusted base conventions, callers, tests and existing feedback. The previous review had no findings. The Claude Code implementation is unchanged since that review, but the newly included parent branch makes its Harbor instructions invalid.

Validation: CI attached to c37da329 passed Nemo_CICD_Test, Unit tests / Test, all four core shards, sandbox tests, combined coverage, changed-server tests and lint. The changed-server log reports 329 passed. CI exercised generated merge commit 51c832c1.

Purpose-built shell probes on the platform-pinned Ubuntu 24.04.4 workstation with Bash 5.2.21 confirmed split-write init handling, rejection of an unavailable required server, dotted-name matching, stdin preservation and exit-status propagation. I relied on CI for repository suites and did not independently reproduce the reported model rollouts.

The non-blocking diagnostics are red: conformance reports three failing scenarios; compliance flags the existing run() method. I did not establish that the conformance failures were introduced by this diff.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

that failed for another reason, keeps that cause. An optional grant that did not connect is left out of the tools
and recorded as an `mcp_server_skipped` gap. The `harbor` Environment Server refuses a task with
`task_mcp_grants: optional` for a harness that does not declare `supports_task_tool_context`, as this one does
not, so run Harbor tasks with `task_mcp_grants: required`. A server lost later in the run shows up as failed tool

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RISK — The recommended Harbor setting prevents configuration from loading. Could you replace the task_mcp_grants: optional|required instructions with the automatic required-grant behavior? The included parent branch removed this setting. _task_tool_accesses() now creates required grants automatically, and the existing regression test explicitly checks that task_mcp_grants="required" raises a validation error. Following this newly added instruction therefore stops a Harbor run before seeding.

Remove the obsolete switch and capability explanation while keeping the explanation that unavailable required servers fail activation. Acceptance: the documented Harbor setup contains no task_mcp_grants setting and agrees with the existing configuration test. Reading that contract settles the mismatch; another test run is unnecessary.

…m the Harbor note

The always-grant task MCP branch below this one in the stack removed task_mcp_grants, so the README's advice to
run Harbor tasks with `task_mcp_grants: required` would now fail config validation. The Harbor Environment Server
grants a task's MCP servers as required on its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Adil Asif <[email protected]>
@adil-a

adil-a commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the RISK in c172c3a345: the README no longer mentions task_mcp_grants. It now says the harbor Environment Server grants a task's MCP servers as required, so a Harbor task's server that does not connect fails the turn, which matches _task_tool_accesses() and the configuration test that refuses the old setting. Docs only; the stdio/SSE MCP PR (#6350) above already used this wording and merges it without conflict.

@adil-a

adil-a commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test c172c3a

@adil-a

adil-a commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

/review reset=true

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP

LGTM. No concerns found.

The prior documentation RISK is resolved. The Harbor instructions no longer recommend task_mcp_grants and now match the automatic required-grant behavior.

I reviewed all 11 changed files, trusted base conventions, existing feedback, grant producers and consumers, network restrictions, activation failures and cleanup paths.

CI: Changed-server tests passed, with 329 Claude Code tests passed in the log. All four core shards, sandbox tests and lint passed. Combined core coverage was still running at my last observation, so the overall test result was not yet known. CI exercised generated merge commit 9641fd3b, not the detached review tree alone.

Probes: Purpose-built Bash probes passed on the platform-pinned Ubuntu 24.04.4 workstation with Bash 5.2.21. They exercised split-write init events, unavailable required servers, dotted-name matching, stdin preservation, exit-status propagation, timeout cleanup and explicit stop before and after init. The shared supervisor confirmed cleanup and preserved partial output. I relied on CI for repository suites and did not independently reproduce the reported model rollouts.

The non-blocking diagnostics are red: conformance reports three failing scenarios, and compliance flags the existing run() method. I did not establish that the conformance failures were introduced by this diff.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@github-actions github-actions Bot added the sla:review-overdue Review response is over the one-business-day SLA label Nov 25, 2026
…to adasif/claude-code-mcp-grants

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Adil Asif <[email protected]>
@adil-a

adil-a commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Updated with main at 66a0698b3c through the PR this one stacks on: merged the updated always-grant-task-MCP head
(#6292, 8f4b5457bd, which merges main 66a0698b3c with no conflicts) into this branch. Merge commit 7c1da2d06b,
now the head; no conflicts.

Of the files this PR changes, main touched only add-or-update-a-harness.mdx (the Pi and OpenClaw upgrades), in
other rows; in claude_code_agent it moved only uv.lock, which this PR does not change. The diff against the always-grant branch still shows
only this PR's 11 files.

Tests on the head (gym env test, serial; no env.yaml in the tree):

  • claude_code_agent: 329 passed

@adil-a

adil-a commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 7c1da2d

@adil-a

adil-a commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

/review reset=true

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP

LGTM. No source-backed defects found.

I reviewed all 11 changed files with three delegated reviewers, including grant producers and consumers, network restrictions, startup failure handling, activation replay and cleanup. The prior Harbor documentation RISK is still resolved: the README describes automatic required grants and no longer recommends task_mcp_grants.

CI: The current-head run reports success for all four core shards, combined coverage, sandbox tests and all eight server shards. The Claude Code suite log shows 329 passed. Lint also passed. Changed-server tests and session-routing end-to-end were skipped, not passed. CI tested generated merge commit 2932becd67284d9f9a192d2207bb634839cba7c8, not the detached review tree alone.

The non-blocking diagnostics are red. Conformance reports three failing scenarios, beginning with retry-call ownership; compliance flags the pre-existing run() method. I did not establish that the conformance failures were introduced by this diff.

Local probes: I used 766267172432.dkr.ecr.us-east-1.amazonaws.com/gym:e27be8e644b414501fe6eb9b905386a07685a2f6, a successful default-branch CI image because this head had no successful container build. Imports were checked against the admitted source. Purpose-built Python and Bash probes passed for grant isolation, collisions, allowlists, split-write init events, stdin and exit-status propagation, supervised cleanup, timeout/error precedence and public seed/activation/replay/close behavior. My leader/public_activation_probe.py passed five public-API scenarios, including repeated requests executing only once and failed required grants exporting startup evidence on close.

I relied on CI for repository suites. The probes used fake providers or a stub CLI; I inspected the author's rollout evidence but did not independently reproduce live model or MCP connectivity.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

This branch has not been deployed

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

Labels

area:agent Agent harnesses and Responses API agent behavior feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer risk:high Autobot PR risk: high sla:review-overdue Review response is over the one-business-day SLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants