-
v0.1.0-dev.37
Pre-releaseAll checks were successfulCode Architecture / inventory (push) Has been skippedCode Architecture / mermaid-comment (push) Has been skippedCode Architecture / review (push) Has been skippedCode Architecture / comment (push) Has been skippedCorn CI / release-check-1 (push) Successful in 14sCorn CI / release-check (push) Successful in 0sCorn Release / release-1 (push) Successful in 20sCorn Release / release (push) Successful in 0sCorn CI / test (push) Successful in 3m58sCorn CI / release (push) Successful in 15sCode Architecture / review-1 (push) Successful in 4m23sCode Architecture / analyze (push) Successful in 0sreleased this
2026-11-22 08:55:24 +00:00 | 86 commits to main since this releasev0.1.0-dev.37 — Reuse upstream MCP sessions; non-blocking timing logs (pre-release)
Proxied upstream tools (Coder) no longer open a new MCP session for every call.
Previously each call made three HTTP requests to the upstream:initialize,
the call itself and a session close. Corn now keeps one open session per user,
bound to that user's current access token, so repeated calls send only the call.- A refreshed or rotated token replaces the session, disconnecting drops it,
and a session idle for two minutes is closed. A session that died (network
error, upstream restart) is replaced on the next call. Sessions close on
shutdown. - Locking is per user: one user's slow connect never delays other users.
- New sessions are opened in an empty context, so a long-lived session never
keeps the first caller's request or auth state. - The stored token is now read off the event loop (worker thread).
Corn also logs one
key=valueline per MCP tool call and tool listing on the
corn.timinglogger (stderr): tool, upstream server, outcome, whether the
upstream session was new or reused, and total, token, connect and call
milliseconds. Lines go onto an in-memory queue and a background thread writes
them, so logging never blocks a request; if the writer falls behind, lines are
dropped. No tokens, arguments, results, user ids or URLs are logged.Local benchmark against a real stateless MCP server: upstream requests per call
3 → 1; proxied call p50 11.5 ms → 4.4 ms with no added latency, 132 ms → 45 ms
with 30 ms simulated per upstream request.No API, database or deployment-file changes.
Source commit
3453fa485817adef076762f808eac35f9082ed09.Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- A refreshed or rotated token replaces the session, disconnecting drops it,