Topic 9 of 9 · Level 4: Durable systems
Cost Optimisation
With the right model, harness, and basic context engineering, you are already operating efficiently. Further savings come from understanding why code provides stronger, cheaper model steering than prose-based guardrails.
A personal June 2026 working record
These figures describe one personal setup and are evidence of that setup, not universal pricing or performance claims.
- Sessions with June usage
- 515
- API usage rows
- 21,531
- Total tokens
- 1,759,100,294
- Input tokens
- 132,573,182
- Output tokens
- 9,981,137
- Cache-read tokens
- 1,616,465,881
- Cache-write tokens
- 80,094
- Raw API cost estimate
- $1,767.580668
The stack was GPT 5.5 with xhigh thinking effort through Codex’s 5× Pro subscription (NZ$200), Pi and context-mode, permissions disabled on a separate isolated machine, and a custom loop framework.
The month’s outputs included a self-hosted web-accessible IDE, one-click app deployment, and a self-hosted workout and calorie tracker with AI coaching integration. Typical use consumed about 30% of a five-hour usage window.
The main levers come first
- Model selection is a major lever. Subscription pricing can offer substantially better value than raw API cost per token for the right use pattern.
- Context engineering is the next major saver. Projects such as context-mode deliver savings by keeping active context targeted.
- Good sandboxing can let you disable approval interruptions, avoiding extra model turns spent asking permission for every action.
Prefer structured steering where reliability matters
Models are still programs. Although a model can now work with plain English, interpreting English costs more than interpreting code languages and structured-data formats.
For automation, variable interpretation makes English fragile beyond what good system design can tolerate. Pi lets a model write short TypeScript extensions, which can implement deterministic behaviour directly.
Prompt libraries and skills are useful in some situations, but where results must be highly reliable it is often better to use code, scripts, and tools. Removing fragility reduces mistakes and turns, which ultimately reduces cost and time.