Skip to content

runtime: cap MCP responses and isolate stdio sessions#107

Draft
maxkle1nz wants to merge 1 commit into
mainfrom
codex/runtime-output-hardening
Draft

runtime: cap MCP responses and isolate stdio sessions#107
maxkle1nz wants to merge 1 commit into
mainfrom
codex/runtime-output-hardening

Conversation

@maxkle1nz
Copy link
Copy Markdown
Owner

What changed:

  • Adds a transport-level cap for oversized MCP text responses.
  • Keeps markdown audit responses compact by returning a summary instead of embedding the full report JSON.
  • Filters m1nd runtime artifacts from ingest, universal document ingest, auto-ingest, and disk search.
  • Adds a session-isolated stdio wrapper for clients that open concurrent workspace sessions.

Why it matters:
Large audit/search payloads can overload MCP clients and chat transcripts. Concurrent stdio clients can also collide when they share one persisted runtime root.

Verification:

  • bash -n scripts/macos/m1nd-stdio-session.sh
  • cargo test -p m1nd-mcp -p m1nd-ingest
  • two wrapper health probes in parallel

Known limits:
Persistent HTTP deployment was not separately smoke-tested with the new response cap.

Large audit/search payloads could exceed what MCP clients can safely persist in chat transcripts, and repeated stdio clients could collide when sharing one runtime root. This adds a transport-level response cap, removes the full audit JSON report from markdown responses, filters m1nd runtime artifacts from ingest/search paths, and documents a session-isolated stdio wrapper.

Constraint: stdio clients may be short-lived and concurrent, so the fix must work without requiring a persistent daemon.
Confidence: high
Scope-risk: moderate
Tested: bash -n scripts/macos/m1nd-stdio-session.sh; cargo test -p m1nd-mcp -p m1nd-ingest; two wrapper health probes in parallel
Not-tested: persistent HTTP deployment with the new response cap
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