[Bug]: Plugin MCP tools are missing from the first turn when discovery publication races capability capture
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
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
- Ambito
- backend-api-design, cli
Direzione di ricerca
Start at prepareTurnCapabilities(signal) and read the turn-capability tests; the issue reports that waitUntilReady() can finish before plugin MCP discovery and publication. Verify that turn capture waits for the current discovery and publication, while cancellation, failed-server behavior, and read-only inspection remain as described. Done means the first turn sees the published plugin inventory and the behavioral regressions pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
An enabled native plugin can complete MCP tools/list successfully while the first headless turn captures an empty plugin tool inventory. The model then cannot discover or invoke those tools. I have prepared a source fix and regression coverage in a fork; this issue follows the repository's current external-contribution process.
Product or interface
CLI - headless
Version
- Reproduced with unmodified official npm
@minimax-ai/code0.6.9 and 0.7.2. - Reproduced without injected latency using public
mainat50448abe3c753391cbfb24df835518d844504862(source version 0.6.5). - Fix also applied to the public 0.7.2 synchronization branch at
0bd2c5a3f425a4e5fdafdf2eb954548e4d20fdfd. - Node.js 22.23.3; pnpm 9.12.0.
Platform
Linux — Alibaba Cloud Linux 3 (Soaring Falcon), update 13, x86_64.
Issue area
MCP / OAuth / integration
Steps to reproduce
Use an isolated MiniMax profile and an enabled local plugin declaring a streamable HTTP MCP server. The real PowerContext Server exposes list_scopes, with a seeded synthetic Scope ID/title. Remove the corresponding private entry from mcp.json to isolate the plugin connection. A separate private-only control succeeds.
A complete real-host reproduction is available in PowerContext at 319e389d3d61bb800cf3d8d7541e9e4522e54f7f, in tests/e2e/test_minimax_host.py:
POWERCONTEXT_MINIMAX_ACCEPTANCE_COMMAND=/absolute/path/to/mcode \
uv run --frozen --extra cli --extra server python -m pytest \
tests/e2e/test_minimax_host.py \
-k 'controlled_inference and plugin-mcp' -q \
--basetemp=/path/to/disposable/test-data
The test launches a real PowerContext Server, SQLite and MiniMax, with synthetic local authentication and an OpenAI-compatible local inference fixture. It uses mcode exec --permission full --max-steps 5 --timeout 40s --output-format json. The fixture selects the discovered tool, invokes it, and requires the seeded Scope ID/title associated with that tool-call ID. No external model account or provider credential is needed; native plugin enablement and Skill delivery are checked independently.
Expected and actual behavior
Expected: the first turn captures the completed, published inventory for the current plugin configuration, so the model can discover and invoke list_scopes.
Actual: both cold and separately preflighted plugin-only executions fail. Native inventory responses include 63 tools and list_scopes; the model sees no Scope tool. The 0.7.2 deferred-discovery path returns an empty tool_search result. Switching to canonical /mcp/ also fails. On unmodified public main, the natural failure reproduces with a successful inventory response in about 264 ms; no artificial delay is required.
Expected one isolated list_scopes tool, discovered []
invoked_tools = []
scope_result_matched = false
Proposed source fix
waitUntilReady() can finish before background plugin MCP discovery/publication. Turn acquisition then captures and retains that incomplete generation; later inventory arrival cannot replace the turn's immutable view. The patch waits at prepareTurnCapabilities(signal) for current discovery and publication, and rechecks readiness at final synchronous capture. The MCP readiness wait has a 20-second bound. Cancelling one waiter leaves shared discovery available to other turns. A published failed server retains the existing fail-open behavior, with healthy servers still available and no wait for retry timers. Read-only plugin inspection remains non-blocking.
The patch changes two runtime files and adds eight behavioral regressions to an existing test file. No vendor bundle, private connection fallback, fixed sleep, or relaxed isolated-route assertion is used.
Validation
- Main-based commit:
pnpm verifypassed the full applicable Linux profile on the clean committed source, including source export, lint, type checking, build, artifact checks, capability tests, Code SDK tests, CLI smoke, offline BYOK and permissions policy. The capability suite reported 5,557 passed / 18 skipped. Windows and macOS sandbox gates were inapplicable; the npm release-archive installation gate was not run because this is a source build. - The focused turn-capability file passed on both branches: 13 tests on main and 17 on the 0.7.2 synchronization source, preserving its existing Agent roster coverage. Seven of the new eight regressions fail against the unmodified main runtime; all eight pass with the fix.
- The main fixed build passed all six real-host controlled-inference cases: private-only, plugin-only and default installation, each under cold and preflight startup.
- The 0.7.2 fixed build passed the complete 13-case PowerContext real-host suite, covering setup/diagnostics, authentication, disabled private settings and all six invocation cases. Its build passed; the full upstream
pnpm verifywas run on the main-based fix, not repeated on this synchronization branch. - Cold plugin-only execution also passed with 6-second and 11-second delays in the actual MCP inventory response (recorded durations 6,023 ms and 11,013 ms). The unmodified main source failed both without injected delay and with the 11-second delay. Every successful invocation returned the seeded Scope ID/title with the matching tool-call ID; the plugin Skill was present and the private MCP entry absent.
These are source-build results, not a claim that official npm 0.6.9 or 0.7.2 has been updated. macOS, Windows, Desktop and external model providers were not exercised. OpenAI Codex assisted with implementation, investigation and verification.
Before submitting
- I have searched existing issues.
- I have included my version and removed sensitive information.
- Lingua principale
- TypeScript
- Stelle
- 2.1k
- Fork
- 271
- Merge medio
- 15h 10m
- PR unite (30g)
- 34
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 MiniMax-AI/minimax-code
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
MiniMax-AI/minimax-code#556 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MiniMax-AI/minimax-code#507 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage tui
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
MiniMax-AI/minimax-code#481 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug cli documentation needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
MiniMax-AI/minimax-code#299 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
ACP: session rejects a new prompt as busy after answering the cancelled prompt with 'cancelled'Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 53/100
MiniMax-AI/minimax-code#569 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di MiniMax-AI/minimax-code
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
excaliburjs/Excalibur#3895 ·
I maintainer di solito rispondono entro 3 giorni
-
infer_audio_type only recognises one MPEG Layer III frame header, so most MP3 files are rejectedForse già presa @Steve-20-ai l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Earn report crashes with "RangeError: Invalid time value" when a report row has an unparsable timestampForse già presa @Gurkaran18 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
joinmarket-webui/jam#1588 ·
I maintainer di solito rispondono entro 3 giorni
-
BeOS .json missingAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
mihaip/infinite-mac#475 ·