Ordering Lunch for One / AI-assisted product development
Codex efficiency technical notes
Optional detail for people building with model APIs.
Optional background for How to use fewer Codex tokens without losing the task. Research checked 3 November 2026.
These notes preserve the programming and API detail behind the beginner guide. API controls are not automatically available as settings in a desktop app.
Set up a programming project for recovery
Keep the supported runtime, installation and build/test commands in the README. Preserve the lockfile that pins dependency versions. Distinguish a known environment failure from a source-code defect.
Use focused AGENTS.md guidance for conventions and recurring boundaries, with specialist detail loaded when relevant. OpenAI’s 11 September 2026 Astra guidance discusses narrow skill triggers and progressive disclosure. Its model-specific advice does not override required project safeguards. The 3 August workflow recipe treats its extra planning files as adaptable conventions.
Keep changes small and complete, inspect the version-control diff and preserve unrelated work. Use separate branches or worktrees—a separate checkout—when concurrent edits would interfere. Tests should check the observable requirement rather than duplicate the implementation. Begin with the focused regression, then relevant integration/build checks; broaden for changed shared behavior or unresolved uncertainty. Check UI interaction/layout and affected authorization or failure paths. Inspect the final diff and retain the actual verification evidence.
A reusable task structure is:
Outcome: What must be true when complete?
Acceptance: Which observable check establishes success?
Context: Which current files, versions and uncertainties matter?
Authority: What may change, and which decisions remain held?
Approach: Use existing conventions and verify the affected result.
Stop: Hold the dependent action if required permission or evidence is missing.
Finish: Return the change, evidence links and unresolved limitation.Retrieve complete evidence with small results
For code, include relevant callers, contracts and tests. For records, preserve pagination completeness, errors, versions and contradictory evidence. Keep originals recoverable. A concise result is useful only if it is sufficient for the decision.
In supported API applications, tool search can defer tool definitions, and programmatic tool calling can process intermediate results before returning them to the model. Discovery, generated code and execution add overhead. A small catalog or one-off result may be simpler to supply directly.
Keep caching and retention distinct
Prompt caching reuses processing for an unchanged prefix, the beginning of a request. Place stable instructions and shared references before changing task details; avoid moving timestamps or other variable material into the reusable beginning. Verify actual cache use.
Read/write rates and lifetimes vary by model. Applicable cache-write rates are not necessarily a surcharge added to ordinary input pricing. Compaction can change a prefix and reduce reuse. Price the actual requests instead of optimizing hit percentage alone. Follow the current OpenAI caching documentation; Claude and Gemini have separate contracts.
A requested cache lifetime can be a minimum availability period, not a deletion deadline. Check the actual retention and data-handling policy for the model and organization before sensitive use. Do not retain or prewarm private material simply to improve reuse. A saved original also needs current retrieval permission before it is sent again.
Follow the compaction contract for the exact mode
Start with native compaction before adding a custom summarizer. Keep original evidence and a current checkpoint available, including restrictions, accepted work and the next obligation.
OpenAI’s native API compaction item is opaque, not a prose summary to edit. The standalone compact endpoint returns the next window to pass on intact. Automatic-compaction chaining has different output-handling rules. Follow the documented mode rather than manually pruning native state by analogy with a text note.
Conversation identifiers simplify bookkeeping; the conversation-state documentation says earlier input in a response chain remains billed.
Compare equivalent finished work
Hold inputs, permissions, acceptance criteria, model and effort constant when testing an instruction or retrieval change. For model selection, deliberately vary the model and retain the same task and acceptance. Include corrections, escalation, helpers, recovery and abandoned attempts. Avoid treating two tasks of different scope as a saving.
Record input tokens with cached portions identified, output with reasoning portions identified, relevant tool/runtime fees and elapsed time. Check subset definitions before adding fields so each actual request is counted once. Subscription allowance, API charges, context capacity and human effort remain different measures. Unknown figures stay unavailable.
OpenAI’s 14 October 2026 maintenance account suggests replaying the same prompt from the same repository snapshot and model while changing one suspect instruction. This is a comparison method, not a demonstrated saving for another project. A single pair can reject an obviously broken shortcut; repeated evidence is needed for broader conclusions.
The 26 September 2026 UT Austin study varied compression across open models and coding/terminal benchmarks. Some Qwen Terminal-Bench policies used about one-third as many tokens but took 20–80% longer. Other outcomes differed by model and task. Neither favorable nor unfavorable compressor results establish a universal policy for Codex.
The 22 October compaction study found losses of process and scope instructions in summaries. It does not directly measure subsequent rule violations. Evaluate later decisions, permitted completion and necessary holds as well as summary retention and task quality.
Try the offline filtering example
This synthetic example keeps an earlier approval and a later pause. It uses only Python’s standard library and makes no model or network request.
import json
rows = [
{"id": i, "project": "Other", "note": "Routine detail. " * 20}
for i in range(200)
]
rows[8] = {"id": 8, "project": "Alpha", "revision": 1, "status": "approved"}
rows[198] = {"id": 198, "project": "Alpha", "revision": 3, "status": "paused"}
selected = [row for row in rows if row["project"] == "Alpha"]
assert {row["id"] for row in selected} == {8, 198}
print("Full characters:", len(json.dumps(rows)))
print("Selected characters:", len(json.dumps(selected)))The executed example returned 72,298 full characters and 136 selected characters for these JSON representations. Those figures are not saved-file byte sizes, model tokens, subscription use or semantic results. The assertion checks known rows; it does not test real remote pagination, permissions or concurrent revisions. A model evaluation would need to check the current decision and respect for the pause. The live trial remains NOT_RUN and post-compaction quality remains unmeasured.
Want help planning a model workflow with clearer costs, permissions and checks? Talk with Mevanu.