applySystemCacheBreakpoint
function applySystemCacheBreakpoint(instructions, marker): SystemModelMessage[];Marks the STABLE HEAD — the first system message — so everything up to and including it is cached.
composeSystem returns [head, volatile]: the head is base instructions + skills and is
byte-identical across turns; the volatile message carries working memory and the flow
node prompt, which change every turn by design. Marking the LAST message here would put
the breakpoint on the volatile one, caching nothing across a flow transition — that is
the bug this exists to prevent, and it cost ~16 points of cache rate (93.20% on a plain
session vs 77.20% once a flow entered).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
readonly |
|
|
Returns
Section titled “Returns”SystemModelMessage[]