MAX_TOKENS

const val MAX_TOKENS: Int = 256

The most tokens a pointer may carry.

write recurses once per token and the path arrives from the agent, so without a bound the agent picks the renderer's recursion depth: a path of /a repeated ten thousand times overflows the stack, and a StackOverflowError is an Error that nothing in the message loop is written to catch — on Kotlin/Native it aborts the process outright rather than raising at all. The bound is far past any data model a UI binds against, and matches DEFAULT_MAX_DEPTH so the two nesting limits agree.