Skip to content

Scope prompt-only MCP grants by MCP#173

Merged
Joncallim merged 8 commits into
mainfrom
codex/fix-mcp-prompt-context-scope
Jul 9, 2026
Merged

Scope prompt-only MCP grants by MCP#173
Joncallim merged 8 commits into
mainfrom
codex/fix-mcp-prompt-context-scope

Conversation

@Joncallim

Copy link
Copy Markdown
Owner

Summary

Fixes the remaining prompt-only MCP brokerage findings from the landed MCP handoff fixes.

  • Scope prompt-only context checks to the same MCP instead of treating any package/agent prompt overlay or subtask as context for every empty grant.
  • Keep required empty grants blocked when the only prompt context belongs to another MCP.
  • Keep same-MCP prompt-only grants warning-only when the live MCP is unavailable, matching the beta behavior where no live MCP handles are issued and prompt context is passed as planning-only instructions.
  • Add regression coverage for the preview and work-package broker paths.

Findings addressed

Validation

  • npx vitest run __tests__/mcp-execution-design.test.ts --pool threads --maxWorkers=1 --no-file-parallelism -> 1 file, 40 tests passed
  • npx vitest run __tests__/mcp-execution-design.test.ts __tests__/work-package-handoff-db.test.ts __tests__/repository-evidence.test.ts --pool threads --maxWorkers=1 --no-file-parallelism -> 3 files, 87 tests passed
  • git diff --cached --check -> passed

Note: npm run lint -- worker/mcp-execution-design.ts __tests__/mcp-execution-design.test.ts was attempted locally but stayed idle for nearly two minutes, matching the earlier local ESLint hang; it was stopped before opening the PR.

Comment thread web/worker/mcp-execution-design.ts Outdated
Comment thread web/__tests__/mcp-execution-design.test.ts
Comment thread web/worker/mcp-execution-design.ts Outdated
Comment thread web/worker/mcp-execution-design.ts Outdated
Comment thread web/worker/mcp-execution-design.ts
Comment thread web/worker/mcp-execution-design.ts Outdated
Comment thread web/worker/mcp-execution-design.ts Outdated
Comment thread web/worker/mcp-execution-design.ts
Comment thread web/worker/mcp-execution-design.ts Outdated
Comment thread web/worker/mcp-execution-design.ts Outdated
Comment thread web/worker/mcp-execution-design.ts
Comment thread web/worker/mcp-execution-design.ts Outdated
Comment thread web/worker/mcp-execution-design.ts
@Joncallim Joncallim marked this pull request as ready for review July 9, 2026 13:20
@Joncallim Joncallim merged commit 093c332 into main Jul 9, 2026
4 checks passed
@Joncallim Joncallim deleted the codex/fix-mcp-prompt-context-scope branch July 9, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant