Residual of modelcontextprotocol#275 that modelcontextprotocol#535 left open: Session loads the whole blob once and save() writes it back, so concurrent requests on one session lose updates.
- tool handlers: 10 parallel
incr() calls writing $context->getSession() lose 25-36 of 50 increments
- SDK bookkeeping is affected the same way - request id counter, pending requests, responses, subscriptions
logging/setLevel sent while other calls run on the session is lost again in some sessions (php -S: 7/8)
Every runtime, main and v0.8.1.
cd harness && uv run gauntlet run -t fpm,worker -s concurrency.session-counter,concurrency.log-level-sticks
Options: the opt-in per-session lock discussed in modelcontextprotocol#275, and/or moving SDK bookkeeping out of the shared blob into per-key storage.
Residual of modelcontextprotocol#275 that modelcontextprotocol#535 left open:
Sessionloads the whole blob once andsave()writes it back, so concurrent requests on one session lose updates.incr()calls writing$context->getSession()lose 25-36 of 50 incrementslogging/setLevelsent while other calls run on the session is lost again in some sessions (php -S: 7/8)Every runtime, main and v0.8.1.
Options: the opt-in per-session lock discussed in modelcontextprotocol#275, and/or moving SDK bookkeeping out of the shared blob into per-key storage.