Open the shared board's session for clients that never initialize #23
<!-- 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>
lgtm
emanuele-em
BurnOutTrader
Fixes #24.
Clients on MCP
2026-07-28never sendinitialize. They sendserver/discover, then namethemselves in every request's
_meta. Claude Code 2.1.309 is one such client. rmcp 3.8.0serves these clients fine on a private board, but on a joined board every tool call returns
The shared board answered 400.A joined
kanzo mcpopens its session on the host by forwarding the client's owninitialize(peer_info()). These clients never sent one, so Kanzo forwards"params": null. The host answers400 Bad Request: Session ID is required, and answers thesame to
notifications/initializedand to thetools/call.This change builds that
initializefrom the request's_metawhen the client never sentone:
2025-11-25, rmcp'sLATEST_WITH_INITIALIZE, since2026-07-28itself has noinitialize.agentwhen the request gives no name.initializeis forwarded exactly as before.add_commenttakes its default author the same way: from_metaon a2026-07-28request,and from
initializeotherwise, as before. Over HTTP, rmcp gives a stateless request astand-in
initializenamedrmcp, so a stateless client that gave no name was credited asrmcp. It is now credited asagent, as it is over stdio.A joined board still opens one host session per
kanzo mcpprocess, so that session keepsthe 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:
claude-code. Onmainit gets the 400.initialize, and a different name in_meta, is still credited withits
initializename.agent.Two unit tests pin the forwarded
initialize: its version, its name and capabilities takenfrom
_meta, and a client's owninitializepassed on unchanged.I tested it against a board shared from another machine:
lists the projects.
initializestill works.kanzo mcpruns this build.No MCP reply changes size.
cargo fmt --check,cargo clippy --all-targets -- -D warningsandcargo testpasson the board changes