Fix GITHUB_TOOLSETS environment variable configuration for Docker containers#1513
Merged
pelikhan merged 3 commits intocopilot/review-mcp-configurationfrom Oct 11, 2025
Merged
Conversation
…gs for all engines Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix toolsets configuration in GitHub container
Fix GITHUB_TOOLSETS environment variable configuration for Docker containers
Oct 11, 2025
…sets-configuration
pelikhan
added a commit
that referenced
this pull request
Oct 11, 2025
…ormat (#1509) * Initial plan * Update Codex remote GitHub MCP configuration to new streamable HTTP format Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Update Codex remote GitHub MCP configuration to new streamable HTTP format Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Use readonly API endpoint instead of headers for Codex remote mode Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Update dev.md to use codex with remote GitHub MCP Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Update dev.md to trigger on dispatch and write poetry Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> * Remove unnecessary GitHub tool configuration from Dev workflow * Refactor GitHub token usage to standardize on GH_AW_GITHUB_TOKEN across workflows and tests * Update workflow triggers to include push events for dev.lock.yml * Fix GITHUB_TOOLSETS environment variable configuration for Docker containers (#1513) * Initial plan * Fix GITHUB_TOOLSETS to pass through environment variable in Docker args for all engines Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Claude and Codex engines were incorrectly passing the
GITHUB_TOOLSETSenvironment variable to the GitHub MCP server Docker container. They were using-e GITHUB_TOOLSETS(which expects the value from the host environment) and then setting the actual value in a separate env section, rather than passing the value directly in the Docker args as documented.This meant the toolset configuration wasn't being properly passed to the container, potentially causing the GitHub MCP server to not receive the correct toolset restrictions.
Solution
Updated both Claude and Codex engines to pass
GITHUB_TOOLSETSwith its value directly in the Docker args, matching the documented pattern:Before (Incorrect):
After (Correct):
Changes
claude_engine.go): Changed to use-e GITHUB_TOOLSETS=<value>format in docker args and removed GITHUB_TOOLSETS from env sectioncodex_engine.go): Changed to use-e GITHUB_TOOLSETS=<value>format in docker args and removed GITHUB_TOOLSETS from TOML env sectionTesting
All unit and integration tests pass, including specific toolset configuration tests. Manual verification confirms the correct Docker command format is now generated for all configurations:
GITHUB_TOOLSETS=allGITHUB_TOOLSETS=repos,issues,pull_requestsGITHUB_TOOLSETS=allOriginal prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.