The signature in #computeAppliedToolSignature hashed the full raw instructions string, but rebuildSystemPrompt truncates each server instruction at 4000 chars before embedding it. A change past character 4000 produced an identical prompt but a different signature, causing a spurious rebuild and a cache miss on every such reconnect. Fix: hoist MAX_MCP_INSTRUCTIONS_LENGTH to module scope in sdk.ts and apply the same truncation in the getMcpServerInstructions callback before returning. The session now hashes exactly the strings that end up in the prompt. Regression test: changes only past char 4000 do not trigger a rebuild; changes within the first 4000 chars do.
@oh-my-pi/pi-coding-agent
Core implementation package for the omp coding agent in the oh-my-pi monorepo.
For installation, setup, provider configuration, model roles, slash commands, and full CLI reference, see:
Package-specific references: