4 ms·
It's true that the initial tool response still has the same amount of tokens but it doesn't keep dragged along in the longer-lived top context.
by ajmurmann 4mo ago
It's true that the initial tool response still has the same amount of tokens but it doesn't keep dragged along in the longer-lived top context.
- knollimar 4mo agoDon't you resend after every turn, so splitting it avoids the n^2 token usage (granted it's cached so there's some optimal amount here)
- ajmurmann 4mo agoYes, exactly. You resend it on every turn (assuming no cache hits). This is why using the shorter-lived subagent to take in that context and only return the useful result back to the longer-lived context safes tokens.