Comment by embedding-shape
10 hours ago
I set some rules for myself: three days of total time, no 3rd party Rust crates, allowed to use commonly available OS libraries, has to support X11/Windows/macOS and can render some websites.
After three days, I have it working with around 20K LOC, whereas ~14K is the browser engine itself + X11, then 6K is just Windows+macOS support.
Source code + CI built binaries are available here if you wanna try it out: https://github.com/embedding-shapes/one-agent-one-browser
Did you use Claude code? How many tokens did you burn? What’d it cost? What model did you use?
Codex, no idea about tokens, I'll upload the session data probably tomorrow so you could see exactly what was done. I pay ~200 EUR/month for the ChatGPT Pro plan, prorating days I guess it'll be ~19 EUR for three days. Model used for everything was gpt-5.2 with reasoning effort set to xhigh.
That 19 EUR figure is basically subscription arbitrage. If you ran that volume through the API with xhigh reasoning the cost would be significantly higher. It doesn't seem scalable for non-interactive agents unless you can stay on the flat-rate consumer plan.
>I'll upload the session data probably tomorrow so you could see exactly what was done.
That'll be dope. The tokens used (input,output,total) are actually saved within codex's jsonl files.
Thank you in advance for that! I barely use AI to generate code so I feel pretty lost looking at projects like this.
very impressive!
it's amazing how far we've come in 20 years. i was a (very minor) contributor to khtml/konqueror (before apple got involved w/ webkit) in the early 2000s, and back then it was such a labor intensive process to even create a halfway working engine. like, months of work just to get basic rendering somewhat correct on a very small portion of the web (which was obv much smaller)
in addition to agentic coding, i think for this specific task having css-spec/html-spec/web-platform-tests as machine readable test suites helps a LOT. the agent can actually validate against real specs.
back in the day, despite having gecko as an open source reference, in practice the "standards" were whatever IE was doing. so you'd spend weeks implementing something only to discover every site was coded for IE's quirks lmao. for all of their other faults, google/apple and other contributors helped bring in discipline to that.
> i think for this specific task having css-spec/html-spec/web-platform-tests as machine readable test suites helps a LOT
You know, I placed the specs in the repository with that goal (even sneaked in a repo that needs compiling before being usable), but as far as I can see, the agent never actually peeked into that directory nor read anything from them in the end.
It'll be easier to see once I made all the agent sessions public, and I might be wrong (I didn't observe the agent at all times), but seems the agent never used though.
oh interesting, so it just... didn't use them? lol. i guess the model's training data already has enough web knowledge baked in that it could wing it. curious if explicitly prompting it to reference the specs would change the output quality or time to solution.
very excited to see the agentic sessions when you release them.. that kind of transparency is super valuable for the community. i can see "build a browser from scratch" becoming a popular challenge as people explore the limits of agentic coding and try to figure out best practices for workflows/prompting. like the new "build a ray tracer" or say nanogtp but for agents.
Those are excellent constraints.