• v0.1.0-dev.37 3453fa4858

    v0.1.0-dev.37
    All checks were successful
    Code Architecture / inventory (push) Has been skipped
    Code Architecture / mermaid-comment (push) Has been skipped
    Code Architecture / review (push) Has been skipped
    Code Architecture / comment (push) Has been skipped
    Corn CI / release-check-1 (push) Successful in 14s
    Corn CI / release-check (push) Successful in 0s
    Corn Release / release-1 (push) Successful in 20s
    Corn Release / release (push) Successful in 0s
    Corn CI / test (push) Successful in 3m58s
    Corn CI / release (push) Successful in 15s
    Code Architecture / review-1 (push) Successful in 4m23s
    Code Architecture / analyze (push) Successful in 0s
    Pre-release

    john released this 2026-11-22 08:55:24 +00:00 | 86 commits to main since this release

    v0.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=value line per MCP tool call and tool listing on the
    corn.timing logger (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