mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 14:46:55 +01:00
Two fixes bundled together, both diagnosed from a live BC MCP failure in a Jernpladsen (Project Management 365) session: - 2026-08-05 (previously drafted, never committed): BC rejects a non-initialize request with a stale/absent Mcp-Session-Id with "A new session can only be created by an initialize request." The prior retry just cleared sessionId and resent the same message with no header, reproducing the identical error. Now replays the client's cached initialize message first to obtain a fresh session, then retries. This also fixes dispatchCreateComment's per-chunk fresh-session reset, which was hitting exactly this failure on every chunk of a >250-char Task Comment. - 2026-08-07: the reactive fix above only self-heals after BC has already rejected a request. A client that opens a fresh session per call (e.g. a Power Automate flow) never hits staleness at all, which is why that pattern reads as more reliable than our long-lived interactive bridge process. Added a proactive refresh: if the cached session has been idle past a heuristic threshold, re-initialize before attempting the call instead of waiting for the rejection. |
||
|---|---|---|
| .. | ||
| machine | ||
| templates | ||
| bc-mcp-bridge.js | ||
| curabis-standard.agent.md | ||
| support-users-onboarded.md | ||
| sync-bcquality-knowledge.ps1 | ||