Skip to content

Comments

fix: Gemini engine uses .gemini/settings.json instead of unsupported --mcp-config flag#16938

Merged
Mossaka merged 6 commits intomainfrom
copilot/fix-gemini-cli-unsupported-flag
Feb 19, 2026
Merged

fix: Gemini engine uses .gemini/settings.json instead of unsupported --mcp-config flag#16938
Mossaka merged 6 commits intomainfrom
copilot/fix-gemini-cli-unsupported-flag

Conversation

Copy link
Contributor

Copilot AI commented Feb 19, 2026

Gemini CLI does not support --mcp-config. It reads MCP server configuration from .gemini/settings.json (project-level). The compiled lock file was generating gemini --mcp-config /tmp/gh-aw/mcp-config/mcp-servers.json ..., causing immediate rejection: Unknown arguments: mcp-config, mcpConfig.

Changes

  • pkg/workflow/gemini_engine.go — Remove --mcp-config from CLI args; update GH_AW_MCP_CONFIG env var to ${{ github.workspace }}/.gemini/settings.json
  • actions/setup/sh/convert_gateway_config_gemini.sh (new) — Gateway output → Gemini settings.json converter, following the same pattern as convert_gateway_config_claude.sh. Strips type/tools fields, fixes gateway domain URLs, writes to $GITHUB_WORKSPACE/.gemini/settings.json
  • actions/setup/sh/start_mcp_gateway.sh — Add gemini) case to engine type router
  • pkg/workflow/gemini_engine_test.go — Assert --mcp-config is absent, verify correct settings path
Engine MCP Config Method
Claude --mcp-config <path> CLI flag
Copilot --mcp-config-file <path>
Codex --mcp-config <path> CLI flag
Gemini .gemini/settings.json file

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -nolocalimports -importcfg git t-22�� k/gh-aw/gh-aw/.github/workflows/ai-moderator.md ache/go/1.25.0/xGO111MODULE /usr/bin/git 923731/b355/_pkggit GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw go /usr/bin/git sh -c &#34;prettier&#34; --wriGOINSECURE git 64/bin/go tierignore x_amd64/vet /usr/bin/git go (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw go /usr/bin/git node /hom�� --write scripts/**/*.js /node .prettierignore x_amd64/compile /usr/bin/git go (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha re GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD iles,SysoFiles,T/home/REDACTED/work/gh-aw/gh-aw/.github/workflows go (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env 4124-27640/test-3683061085/.github/workflows GO111MODULE .cfg GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha 5 c1f3a7e6e2ab4063a7f10073:go.mod /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env 4124-27640/test-823209778 GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha --show-toplevel go r,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,disp--show-toplevel 1zH8/K9m-5ZMr7Yugit flow-12345 64/bin/go git -C /tmp/gh-aw-test-runs/20260219-224124-27640/test-823209778 rev-parse /usr/bin/git @{u} k/gh-aw/gh-aw/pkrev-parse 64/bin/go git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha sistency_GoAndJavaScript2723016421/001/test-empty-frontmatter.md GO111MODULE ipts.test GOINSECURE GOMOD GOMODCACHE ipts.test 5658�� /tmp/go-build2565835510/b405/_pkg_.a -trimpath /usr/bin/git -p github.com/githurev-parse -lang=go1.25 git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha GOMODCACHE sh /usr/bin/git npx prettier --cgit GOPROXY 64/bin/go git rev-�� --show-toplevel node /usr/bin/git ub/workflows scripts/**/*.js 64/bin/go git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha prettier --write 64/bin/go **/*.ts **/*.json --ignore-path sh -c npx prettier --wGOSUMDB git /sh tierignore go /usr/bin/git go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha prettier --write 64/bin/go **/*.ts **/*.json --ignore-path sh -c npx prettier --wGOSUMDB git 64/bin/go tierignore go /usr/bin/git go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE es/.bin/node GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ck &#39;scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD erignore go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE s not exist yet&#34;config (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha bot-detection.md GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json .cfg .cfg GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha &#34;prettier&#34; --wriGOSUMDB git 64/bin/go --show-toplevel go /usr/bin/git go env re GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha --noprofile git 64/bin/go --show-toplevel go /usr/bin/git sh -c &#34;prettier&#34; --wriGOINSECURE git 64/bin/go --show-toplevel x_amd64/vet /usr/bin/git node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha &#34;prettier&#34; --wriGOINSECURE gh 64/bin/go list --json /usr/bin/git sh -c &#34;prettier&#34; --wriGOSUMDB git 64/bin/go --show-toplevel x_amd64/compile /usr/bin/git go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha &#34;prettier&#34; --wriGOINSECURE infocmp 64/bin/go xterm-color go /usr/bin/git sh -c &#34;prettier&#34; --wriGOSUMDB git 64/bin/go --show-toplevel x_amd64/vet run-script/lib/nactions/setup-cli/install.sh go (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha blog-auditor.md GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha --noprofile git 64/bin/go --show-toplevel go /usr/bin/git sh -c &#34;prettier&#34; --wriGOINSECURE git 64/bin/go --show-toplevel x_amd64/vet run-script/lib/n--check node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha &#34;prettier&#34; --wriGOINSECURE /opt/hostedtoolcGOMOD 64/bin/go github.event.inpnode go /usr/bin/git sh -c &#34;prettier&#34; --wri**/*.ts git 64/bin/go --show-toplevel go /usr/bin/git ; \ fi (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha -json GO111MODULE r: $owner, name:-f GOINSECURE GOMOD GOMODCACHE go env json&#39; --ignore-path ../../../.pr**/*.json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha -json GO111MODULE $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha -json GO111MODULE $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ode_modules/.bin-f GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/docker/login-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ode_modules/.bin-f GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE es/.bin/node GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ode_modules/.bin/node GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha ./cmd/gh-aw GO111MODULE $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env hub/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env hub/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE -j/NEbzTRrGx3Hf7l9Ai1Xn/DcrjArqgremote.origin.url (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path heck &#39;**/*.cjs&#39; GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 bagabas/go-udiff-V=full GOMODCACHE go env DfIt/H91eAJ5JZRwGOSUMDB GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 923731/b381/importcfg (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE x_amd64/link env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE aW/2osiZ8zMNj6LByjKSNgl/XqMbwRRyyZs52_mFyI41 (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha npx prettier --wGOSUMDB 0/x64/bin/npm 64/bin/go tierignore go /usr/bin/git go env h ../../../.pret.prettierignore GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/-
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/- --jq .object.sha --write ../../../**/*.js--ignore-path $name) { hasDiscussionsEnabled } } --ignore-path ../../../.pretti-V=full /usr/bin/git go env re GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 3683061085/.github/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD erignore go env -json GO111MODULE 64/bin/go GOINSECURE c1f3a7e6e2ab4063-c GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE erignore env -json c1f3a7e6e2ab4063GOMOD 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build2565835510/b380/cli.test /tmp/go-build2565835510/b380/cli.test -test.testlogfile=/tmp/go-build2565835510/b380/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE go k/gh�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD erignore go (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name heck &#39;**/*.cjs&#39; GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD ode-gyp-bin/sh go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>fix: Gemini engine passes unsupported --mcp-config flag to Gemini CLI</issue_title>
<issue_description>## Bug

The Gemini engine compiler generates a CLI invocation with --mcp-config, which the Gemini CLI does not support:

gemini --mcp-config /tmp/gh-aw/mcp-config/mcp-servers.json --output-format json --prompt "..."

Gemini CLI rejects this immediately:

Unknown arguments: mcp-config, mcpConfig

Reproduction

Triggered Smoke Gemini workflow on gh-aw-firewall after merging github/gh-aw-firewall#974:

Root Cause

The compiled lock file (line 1373) passes --mcp-config as a CLI flag:

gemini --mcp-config /tmp/gh-aw/mcp-config/mcp-servers.json --output-format json --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"

Gemini CLI does not have a --mcp-config flag. Instead, it reads MCP server configuration from settings.json files:

  • Global: ~/.gemini/settings.json
  • Project: .gemini/settings.json

The mcpServers key in settings.json supports command, url, or httpUrl transports. See: https://geminicli.com/docs/tools/mcp-server/

Impact

  • Agent never starts (0 turns, 0 tokens)
  • All downstream jobs (detection, safe_outputs) are skipped
  • The firewall itself works correctly — only the CLI invocation is broken

Suggested Fix

In the Gemini engine command builder (pkg/workflow/gemini_engine.go or equivalent):

  1. Instead of passing --mcp-config <path>, write the MCP config to .gemini/settings.json (project-level) as a pre-step before invoking the Gemini CLI
  2. The settings.json format uses mcpServers key with server entries containing command/url/httpUrl
  3. Remove --mcp-config from the generated command

Comparison with Other Engines

Engine MCP Config Method
Claude --mcp-config <path> CLI flag
Copilot --mcp-config-file <path> or ~/.copilot/mcp-config.json
Codex --mcp-config <path> CLI flag
Gemini ~/.gemini/settings.json or .gemini/settings.json file

Audit Data

gh aw audit 22202278807
  • 1 error, 0 warnings
  • Agent job: failure
  • Duration: 3.8m (mostly container build time)</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.


Changeset

  • Type: patch
  • Description: Ensure the Gemini engine writes its MCP configuration to .gemini/settings.json instead of relying on the unsupported --mcp-config flag

Generated by Changeset Generator



✨ PR Review Safe Output Test - Run 22204310776

💥 [THE END] — Illustrated by Smoke Claude

…--mcp-config flag

Remove --mcp-config CLI flag from Gemini engine execution (Gemini CLI does not
support it). Instead, add convert_gateway_config_gemini.sh that writes MCP
server configuration to .gemini/settings.json (project-level), which is the
format Gemini CLI expects. Update start_mcp_gateway.sh to route Gemini engine
to the new conversion script.

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unsupported --mcp-config flag in Gemini CLI fix: Gemini engine uses .gemini/settings.json instead of unsupported --mcp-config flag Feb 19, 2026
Copilot AI requested a review from Mossaka February 19, 2026 22:50
@Mossaka Mossaka marked this pull request as ready for review February 19, 2026 22:54
Copilot AI review requested due to automatic review settings February 19, 2026 22:54
Accept main's smoke-gemini.lock.yml; will recompile after.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes Gemini engine MCP configuration by switching from an unsupported --mcp-config CLI flag to Gemini CLI’s expected project-level .gemini/settings.json.

Changes:

  • Removed --mcp-config from Gemini CLI invocation and updated GH_AW_MCP_CONFIG to point at ${{ github.workspace }}/.gemini/settings.json.
  • Added a Gemini MCP gateway config conversion script that writes .gemini/settings.json.
  • Updated MCP gateway startup routing and Gemini engine tests/lock workflow to reflect the new configuration mechanism.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/workflow/gemini_engine.go Stops emitting unsupported --mcp-config flag; sets MCP config env var to .gemini/settings.json when MCP servers are present.
pkg/workflow/gemini_engine_test.go Updates assertions to ensure --mcp-config is absent and env var points to .gemini/settings.json.
actions/setup/sh/start_mcp_gateway.sh Adds gemini) converter dispatch case.
actions/setup/sh/convert_gateway_config_gemini.sh New converter that transforms gateway output into Gemini .gemini/settings.json.
.github/workflows/smoke-gemini.lock.yml Updates generated workflow invocation/env to remove --mcp-config and use .gemini/settings.json.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Recompiled with dev build. The lock file now uses .gemini/settings.json
for MCP config instead of the unsupported --mcp-config CLI flag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Mossaka Mossaka force-pushed the copilot/fix-gemini-cli-unsupported-flag branch from e2bfdf7 to dcd4d8b Compare February 19, 2026 23:01
@Mossaka Mossaka added the smoke label Feb 19, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

🧪 Smoke Temporary ID is now testing temporary ID functionality...

@github-actions
Copy link
Contributor

🧪 Smoke Project is now testing project operations...

@github-actions
Copy link
Contributor

Smoke Project completed successfully. All project operations validated.

@github-actions
Copy link
Contributor

PR titles:

  • Bundle WASM release assets into versioned archive
  • fix(daily-repo-chronicle): move discussion category to announcements
    GitHub MCP: ✅
    Serena MCP: ✅
    Playwright: ✅
    File write+cat: ✅
    Build gh-aw: ✅
    Overall: PASS

🔮 The oracle has spoken through Smoke Codex for issue #16938

@github-actions
Copy link
Contributor

Smoke test results for @Mossaka and @Copilot:

Test Status
GitHub MCP
Safe Inputs GH CLI
Serena MCP ❌ (not configured)
Playwright
File Writing
Bash Tool
Discussion Interaction
Build gh-aw
Discussion Creation
Haiku Printer
PR Review

Overall: ⚠️ PARTIAL PASS (10/11 — Serena MCP unavailable)

📰 BREAKING: Report filed by Smoke Copilot for issue #16938

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Reviewed PR #16938: Gemini MCP config fix. The approach of writing to .gemini/settings.json instead of using the unsupported --mcp-config flag is correct. The new conversion script and engine changes look good overall.

📰 BREAKING: Report filed by Smoke Copilot for issue #16938

if HasMCPServers(workflowData) {
geminiArgs = append(geminiArgs, "--mcp-config", "/tmp/gh-aw/mcp-config/mcp-servers.json")
}
// Gemini CLI reads MCP config from .gemini/settings.json (project-level)
Copy link
Contributor

Choose a reason for hiding this comment

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

Good fix! Removing the --mcp-config flag and delegating config to .gemini/settings.json aligns with how Gemini CLI actually works. The comment clearly explains the intent.

GEMINI_SETTINGS_FILE="${GEMINI_SETTINGS_DIR}/settings.json"

mkdir -p "$GEMINI_SETTINGS_DIR"

Copy link
Contributor

Choose a reason for hiding this comment

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

The jq transformation correctly strips the type and tools fields that Gemini doesn't support. Consider adding a check for an empty mcpServers object in case the gateway output has no servers, to avoid writing an invalid settings file.

@github-actions
Copy link
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

Smoke Test Results - Run §22204310776

Core Tests (1-10)
1 GitHub MCP ✅ | 2 safeinputs-gh ✅ | 3 Serena ✅ | 4 Make Build ✅ | 5 Playwright ✅
6 Tavily ✅ | 7 File Write ✅ | 8 Bash ✅ | 9 Discussion ✅ | 10 AWF MCP ✅

PR Review Tests (11-17)
11 Update PR ✅ | 12 Review Comments ✅ | 13 Submit Review ✅ | 14 Resolve Thread ✅
15 Add Reviewer ✅ | 16 Push Branch ✅ | 17 Close PR ⚠️ (skipped)

Overall: PARTIAL (16 passed, 1 skipped)

💥 [THE END] — Illustrated by Smoke Claude for issue #16938

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

💥 Automated smoke test review - all systems nominal!

💥 [THE END] — Illustrated by Smoke Claude for issue #16938

@Mossaka Mossaka merged commit a280a6b into main Feb 19, 2026
@Mossaka Mossaka deleted the copilot/fix-gemini-cli-unsupported-flag branch February 19, 2026 23:52
github-actions bot pushed a commit that referenced this pull request Feb 20, 2026
… config pattern (v2.5)

Daily documentation consolidation for 2026-02-19. Analyzed 61 markdown
files in scratchpad/, fixed 6 marketing/subjective language instances,
added Engine-Specific MCP Config Delivery documentation based on the
Gemini engine fix (PR #16938), and updated scratchpad/dev.md to v2.5.

Changes:
- scratchpad/dev.md: version v2.4->v2.5, added Engine-Specific MCP
  Config Delivery section with Mermaid diagram (1757->1787 lines)
- scratchpad/engine-architecture-review.md: removed 'well-designed',
  'excellent flexibility', 'excellent extensibility', 'well-organized'
- scratchpad/engine-review-summary.md: removed 'excellent and ready for
  extension', 'excellent test coverage', 'well-designed'
- scratchpad/errors.md: 'user-friendly' -> 'clear explanations for end users'

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
github-actions bot pushed a commit that referenced this pull request Feb 20, 2026
- Add Google Gemini as a supported AI engine in engines.md, including
  setup steps for GEMINI_API_KEY and a note about MCP configuration
  via .gemini/settings.json (from #16938 and #16983)
- Expand the ecosystem identifiers table in network.md from a compact
  multi-value row to individual rows with domain examples for each
  identifier, and add new entries: clojure, elixir, kotlin, scala, zig
  (from #17072)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: Gemini engine passes unsupported --mcp-config flag to Gemini CLI

2 participants