Field notesNote
FILED / Aug 4, 2026
- security
- ai
- cli
The model could write the extension. It didn’t need my cookies.
A local request-minimizing boundary kept live session cookies out of the model chat while Codex still helped build the extension: 45 cookies to one in one documented run, 41 to one in a separate capture.
I wanted Codex to help me build an extension that could show my current Alibaba token-plan usage.
The easiest path seemed obvious: copy the authenticated request from my browser, paste it into the chat, and ask the model to reproduce it.
Then I looked at what I was about to send.
The copied request contained a whole collection of live session cookies. They were temporary. They were revocable. They were connected only to my own account.
None of that made pasting them into a cloud model a good habit.
That was the part that bothered me most. This was not only about whether one particular set of cookies would cause permanent damage. It was about training myself to treat secrets as ordinary debugging context whenever sharing them made a task easier.
Once that becomes normal, it is easy to stop noticing what is being copied.
I still wanted the model’s help. Codex could inspect the public response shape, plan the extension, write the parser, add tests, and help package the result. It just did not need my live browser session to do any of that.
So I needed a boundary between the authenticated request and the model.
That became Request Minimizer.
The tool runs locally. I give it the copied request without putting that request into a chat. It verifies that the original request works, then experiments with removing cookies and checking whether the expected authenticated response still comes back.
The first surprise was how much authentication material the browser had attached that the endpoint did not actually need.
In one documented run, the request went from 45 cookies to one after 18 verification requests. A later real run, preserved in the project’s terminal capture, went from 41 cookies to one after 15 requests.
Those are separate runs, not two descriptions of the same result.
But “one cookie” does not mean “safe to paste into ChatGPT.”
That final cookie is still a credential. If it proves the request is authenticated, it still deserves to be treated like a secret.
The useful result was understanding the boundary.
I could keep the raw request and its credential values local. I could inspect which pieces were actually required. I could redact or describe the structure of the request without casually dropping an entire browser session into the conversation. And Codex could still help me build the extension around a documented response contract, fixtures, and sanitized examples.
The model got the information it needed to help with the software.
It did not get the credential needed to act as me.
There was another complication.
A minimizer can easily produce a convincing wrong answer if it only checks whether the server returned a successful HTTP status.
The endpoint might redirect to a login page. It might return an HTML error document. It might return JSON with a different meaning. It might preserve a status code while silently dropping the authenticated data I actually cared about.
So removing cookies was only half the job.
The tool also needed to keep proving that the response was the correct authenticated response. That meant validating the expected structure and treating redirects, authentication failures, HTML responses, malformed data, and ambiguous results as failures rather than progress.
The experiment had to fail closed.
Otherwise, the tool could confidently announce that authentication was no longer required when it had really minimized the request into a login page.
That changed the project from a quick cookie-removal script into something narrower and more deliberate.
Request Minimizer does not prove that a credential is harmless. It does not make secrets publishable. It does not guarantee that the smallest working request will remain stable forever.
It answers a more limited question:
What is the smallest credential set that still produces the specifically validated response right now?
That was enough for my purpose.
The larger lesson was not that I should avoid using AI for work involving authenticated systems. The model was genuinely useful for planning and implementing the extension.
The lesson was to separate the part that requires reasoning from the part that requires authority.
Codex needed to understand the request and response.
It did not need possession of my session.
Temporary credentials are still credentials. Revocable secrets are still secrets. And convenience is exactly when a security boundary is easiest to wave away.
I still use AI to help build tools around private systems.
I just try to design the workflow so the model receives the smallest amount of information required to help—and none of the authority it does not need.
Related work
- Request Minimizer case studyA CLI that imports a copied cURL request, verifies the endpoint, and experimentally reduces authentication material to the smallest working cookie subset.