claude_code.internal.tool_protocol
The envelope protocol, appended to the prompt when BAML tools are active. The guidance about never repeating a successful call is load-bearing: each invoke is a fresh CLI process, and the conversation text is the only memory it has.
Reference version
Signature
function claude_code.internal.tool_protocol(
tb: ai.tools.Toolbox
) -> string throws baml.json.SerializationError
The envelope protocol, appended to the prompt when BAML tools are active. The guidance about never repeating a successful call is load-bearing: each invoke is a fresh CLI process, and the conversation text is the only memory it has.
Source:<builtin>/claude_code/ns_internal/cli.bamlbytes 4268–5720