Latest field notes
- Count tokens before you sendCount tokens in code before the call, and block requests that blow the budget.
- Cap retries and budget themRetry only errors that can pass, with backoff and a hard cap, in one layer.
- Trim history without losing the goalKeep the system prompt and a goal summary, then fill the rest with the newest turns.