bug(codex): mocked MCP servers are written into the user's global ~/.codex/config.toml and left there
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- cli, developer-experience
Direzione di ricerca
Start in internal/agent/codex.go: the install path around lines 146-149 (codex mcp remove then codex mcp add) and the session lookup near line 1130 that hard-codes $HOME/.codex/sessions. Reproduce by copying ~/.codex/config.toml, running a Codex case with a mocked server on environment.type: none, and diffing the file. Done when the install and the session lookup both use one per-case CODEX_HOME, and the global config is unchanged after the run.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
On environment.type: none, the Codex engine installs MCP servers with codex mcp add (codex.go#L149), which writes to the user's global ~/.codex/config.toml. Before adding, it runs codex mcp remove for the same name (codex.go#L146), so a user's own server with that name, say a real github server, is replaced by the mock. Nothing removes the entry after the run, so every later Codex session on that machine, outside skill-up too, starts the mocked server. Claude Code installs with --scope project, so this only affects Codex.
Steps to reproduce
- Copy
~/.codex/config.tomlaside. - Run any Codex case with a mocked server on
environment.type: none. Mine:
# SKILL.md body: call get_order on the shop MCP server and report the status it returns.
# evals/fixtures/mcp/shop.yaml
tool_responses:
get_order:
default:
order_id: "{{params.order_id}}"
status: SHIPPED-7F3Q
# evals/cases/lookup.yaml
id: lookup
input:
prompt: What is the status of order 42? Use the shop tools.
judge:
type: rule_based
success:
- tool_called:
name: mcp__shop__get_order
- output_contains:
all: ["SHIPPED-7F3Q"]
# evals/eval.yaml
schema_version: v1alpha1
environment:
type: none
skills:
- source: local_path
path: .
mcp:
servers:
- name: shop
mode: mocked
config_ref: evals/fixtures/mcp/shop.yaml
engine:
name: codex
model: {}
cases:
files: [evals/cases/lookup.yaml]
- Diff the config against the copy.
Expected behavior
The user's Codex config is unchanged after the run, or skill-up uses a Codex home of its own.
Actual behavior
- A new
[mcp_servers.shop]table holds the whole generated Node script (136 added lines) and stays after the run. - Codex rewrites the file while adding it. Empty
http_headers = {}tables and an emptyargs = []disappear from unrelated servers, and a trust entry for the temporary workspace is added under[projects]. - The eval session also loads every MCP server and the global instructions from the user's own Codex setup, so results depend on the machine.
Environment
- skill-up
0.14.0-14-g99894b3(main, built from source) - Codex CLI
0.166.0, preinstalled and logged in, account default model (gpt-6-astrain every run) (skill-up's default pin is0.80.0, codex.go#L35) - Go 1.26.0, macOS arm64,
environment.type: none
Additional context
Setting environment.env.CODEX_HOME to a separate folder keeps the global file untouched, but the session lookup hard-codes $HOME/.codex/sessions (codex.go#L1130), so it then misses the session file. A CODEX_HOME per case runtime, used by both install and lookup, with the user's auth.json copied in, would isolate local runs. Per case rather than per run, since two cases can mock the same server name with different fixtures.
- Lingua principale
- Go
- Stelle
- 1.5k
- Fork
- 134
- Merge medio
- 1g 22h
- PR unite (30g)
- 61
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di alibaba/skill-up
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
OpenSandbox runtime: expect.files_exist and file_contains fail because WorkspacePath is remoteForse già presa @bababoom721 l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
alibaba/skill-up#408 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
alibaba/skill-up#407 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
alibaba/skill-up#406 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di alibaba/skill-up
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
fluxcd/notification-controller#1441 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
OneBusAway/maglev#2145 ·
I maintainer di solito rispondono entro 2 giorni
-
priority/medium status/ready type/chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
discobox-ai/discobox#1357 ·
I maintainer di solito rispondono entro 1 giorno
-
TestPseudoLocaleRemote fails now and then: it types the code before the laptop asks for itForse già presa @fzn0x l’ha presa oggi. Apertabug priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
edit_file diff rendering panics on invalid UTF-8 textForse già presa @TDnorthgarden l’ha presa oggi. Apertaarea/tui
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
docker/docker-agent#4955 ·
I maintainer di solito rispondono entro 1 giorno