← Back to Pull requests

Open the shared board's session for clients that never initialize #23

Merged
BurnOutTrader merged 2 files (193 lines) on Nov 04, 2026 20:21 UTC
View on GitHub
BurnOutTrader BurnOutTrader commented on Nov 03, 2026 22:42 UTC
Author

Fixes #24.

Clients on MCP 2026-07-28 never send initialize. They send server/discover, then name
themselves in every request's _meta. Claude Code 2.1.309 is one such client. rmcp 3.8.0
serves these clients fine on a private board, but on a joined board every tool call returns
The shared board answered 400.

A joined kanzo mcp opens its session on the host by forwarding the client's own
initialize (peer_info()). These clients never sent one, so Kanzo forwards
"params": null. The host answers 400 Bad Request: Session ID is required, and answers the
same to notifications/initialized and to the tools/call.

This change builds that initialize from the request's _meta when the client never sent
one:

  • It uses 2025-11-25, rmcp's LATEST_WITH_INITIALIZE, since 2026-07-28 itself has no

  • initialize.
  • It names the client agent when the request gives no name.

  • A client that did send initialize is forwarded exactly as before.
  • add_comment takes its default author the same way: from _meta on a 2026-07-28 request,
    and from initialize otherwise, as before. Over HTTP, rmcp gives a stateless request a
    stand-in initialize named rmcp, so a stateless client that gave no name was credited as
    rmcp. It is now credited as agent, as it is over stdio.

    A joined board still opens one host session per kanzo mcp process, so that session keeps
    the name from the process's first call. Clients send the same name on every call, so this
    shows only if a client's name changes partway through.

    Three new tests run the real server in process:

  • A stateless client's comment, sent through a joined board, reaches the host credited as

  • claude-code. On main it gets the 400.
  • A client that sends initialize, and a different name in _meta, is still credited with

  • its initialize name.
  • A stateless HTTP client that gives no name is credited as agent.
  • Two unit tests pin the forwarded initialize: its version, its name and capabilities taken
    from _meta, and a client's own initialize passed on unchanged.

    I tested it against a board shared from another machine:

  • With Claude Code 2.1.309's own messages replayed, 0.3.0 returns the 400, and this branch

  • lists the projects.
  • A client that sends initialize still works.

  • A live Claude Code session's calls succeed once its kanzo mcp runs this build.
  • No MCP reply changes size.

  • cargo fmt --check, cargo clippy --all-targets -- -D warnings and cargo test pass

  • A board change was tried in a browser, in light and dark mode: not applicable, nothing

  • on the board changes
  • The README says what changed for users, if anything did: nothing changes for users
  • Diff: 193 lines (+188 / -5) across 2 files Reviewer: emanuele-em Review duration: 1299m
    All Vouch review confidence checks passed
    Residual risk 0.12 = Change Risk (0.41) × (1 − Review Confidence (0.70)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.41 · 193 lines diff across 2 files
    0.41
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.54 · 1 substantive comment(s)
    0.54
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    70%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.315
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    3 items
    github-actions[bot] github-actions[bot] commented on Nov 04, 2026 20:21 UTC
    Bot

    <!-- kanzo-resources -->

    Resources

    If merged, nothing moves by more than noise.

    Agents

    | | main | this PR | change |
    | --- | ---: | ---: | ---: |
    | Tool list, read every session | 2.9 KB | 2.9 KB | same |
    | Instructions, read every session | 325 B | 325 B | same |
    | Reply to list_projects | 59 B | 59 B | same |
    | Reply to list_tasks (8) | 316 B | 316 B | same |
    | Reply to get_task | 433 B | 433 B | same |
    | Reply to next_task | 450 B | 450 B | same |
    | Reply to add_comment | 37 B | 37 B | same |
    | Reply to update_task | 55 B | 55 B | same |
    | Reply to create_task | 42 B | 42 B | same |

    Program

    | | main | this PR | change |
    | --- | ---: | ---: | ---: |
    | Binary | 4.78 MB | 4.79 MB | +11.8 KB (+0.2%) |
    | Crates in Cargo.lock | 157 | 157 | same |

    Memory

    | | main | this PR | change |
    | --- | ---: | ---: | ---: |
    | Idle board | 6.24 MB | 6.43 MB | +188.4 KB (+3.0%) |
    | Board with 3,000 tasks loaded | 11.89 MB | 11.96 MB | +73.7 KB (+0.6%) |
    | Peak of the board | 11.89 MB | 11.96 MB | +73.7 KB (+0.6%) |
    | kanzo mcp after a session | 8.18 MB | 8.21 MB | +28.7 KB (+0.4%) |
    | Threads when idle | 1 | 1 | same |

    Speed

    | | main | this PR | change |
    | --- | ---: | ---: | ---: |
    | Start | 1.4 ms | 1.4 ms | same |
    | /api/board with 3,000 tasks | 8.6 ms | 8.3 ms | same |

    Storage

    | | main | this PR | change |
    | --- | ---: | ---: | ---: |
    | Empty database | 78.6 KB | 78.6 KB | same |
    | Database with 3,000 tasks | 1.26 MB | 1.26 MB | same |
    | /api/board reply with 3,000 tasks | 1.06 MB | 1.06 MB | same |
    | Board page (HTML, JS, logo) | 105.3 KB | 105.3 KB | same |

    <sub>Measured on GitHub's ubuntu-26.04 runner, median of 3 rounds with the builds taking turns. Changes in bold are past noise: 1% for sizes, 5% for memory, 15% for times. Agents' text is in bytes: add an ANTHROPIC_API_KEY secret to count tokens.</sub>

    emanuele-em emanuele-em approved these changes on Nov 04, 2026 20:21 UTC
    Approved Reviewer

    lgtm

    Reviewers
    Assignees
    BurnOutTrader BurnOutTrader
    Labels
    risk: low confidence: 70.1% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 41.0% (MEDIUM) · Higher = larger blast radius
    41.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 70.1% · Lower = rushed or shallow review
    70.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 12.2% · Safe to merge
    12.2%