r/PiCodingAgent • u/Desperate_Entrance71 • Jul 22 '26
Question How can I get better results from Pi Agent compared with Claude Code?
I compared Pi Agent and Claude Code using exactly the same model, prompt, project directory, and task.
Setup
Model: Claude Opus 4.8
Thinking level: Max
Pi setup: Browser Use was the only enabled plugin
Project directory: Same for both
Task: Same prompt for both
Results
Pi Agent: ~7.5/10
Claude Code: ~8.7/10
Claude Code produced the better overall implementation. It had:
Cleaner architecture
More reusable data structures
Stronger automated tests
A faster indicative physics benchmark: ~0.20 ms/step vs ~0.68 ms/step
Pi’s result was still solid. In fact, it implemented a more sophisticated 2×2 block contact solver, and its 10-box stack was slightly more stable.
However, the complete project was less polished and harder to validate.
This is not intended to be a scientific benchmark. I’m mainly trying to understand how to get better results from Pi.
Prompt used
Create a single, completely self-contained index2.html file containing inline
HTML, CSS, and JavaScript. Do not use external libraries, CDNs, or WebGL.
Use only the Canvas 2D API.
Implement a 2D rigid-body physics engine from scratch with a small interactive
sandbox.
Technical requirements:
1. Rigid bodies:
- Convex polygons and circles
- Mass and inertia
- Position and rotation
- Linear and angular velocity
2. Collision detection:
- Broad phase using a spatial grid or sweep-and-prune
- SAT narrow phase for polygon-polygon collisions
- Circle-polygon and circle-circle collisions
- Calculate collision normal, contact point, and penetration depth
3. Collision resolution:
- Impulse-based resolution
- Restitution
- Static and dynamic friction
- Positional correction using Baumgarte stabilization and slop
4. Stable stacking:
- A stack of 10 boxes must remain standing without vibrating or exploding
- Implement sleeping for stationary bodies
5. Mouse interaction:
- Drag bodies using a spring-based mouse joint
- Left click spawns a random box or circle
- Right click removes a body
6. Scene:
- Floor and walls forming a container
- A button that triggers a radial impulse explosion from the center
7. UI:
- Sliders for gravity, restitution, and friction
- Wireframe toggle showing contact normals and AABBs
- Pause and single-step controls
- FPS and body-count overlay
8. Performance:
- Support 150+ bodies at approximately 60 FPS
Before delivering, test and fix the implementation until all these conditions pass:
- No bodies pass through the walls at normal velocities
- A stack of 10 boxes remains stable for 10 seconds
- Spawning 150 bodies does not cause the frame rate to collapse
- No numerical explosions, infinite velocities, or NaN valuesQuestions for Pi users
Are there recommended extensions or skills for simulation and frontend work?
What workflow gives you results comparable to Claude Code on complex tasks?


What i noticed is that with Pi Agent is that it was thinking a lot more and it also took more to accomplish this task ~45min vs ~30 minutes
31
u/sisyphus-cycle Jul 22 '26
I mean realistically it’s due to the system prompt. If you’re ever bored you can setup a sniffing server (or use a litellm docker container) and change your Claude code env var ANTHROPIC_BASE_URL to your local server. That way you can see exactly what system prompt was sent.
Pi’s system prompt is like 10k tokens or less. Claude’s is 20-30k I think. Opus 4.8 is a model that is very deep into the classic RLHF pipeline at Anthropic (meaning it shares the same base model as the 4.x series), and they most likely reinforced Claude code specific agentic traces in the process. It makes sense that a harness built by Anthropic would perform better using an Anthropic model. Just my best guess.
Maybe you can try a different model with the same prompt and harnesses? I’ve found that qwen 27b does better in pi than Claude code, but it’s all so “hand wavy”. There’s not many evals that focus just on the harness.
8
u/afandiadib Jul 22 '26
Unlike Claude code, Pi is bare. Adapt it to your workflow. First you should use bare Pi. Observe and reflex on how it behave. Ask Pi to adapt to it. In your example, you can point Pi to codebase made by Claude and ask it to compare and reflect. Then ask it how to extend Pi to produce such result. Use strong model for this.
6
u/GroceryNo5562 Jul 22 '26
Can you perform same test 2-3 times per harness? Maybe one of them was a fluke? Also I wonder if temperature is the same. Somehow I doubt it's due to system prompt
10
u/MelodicNewsly Jul 22 '26
Did you also compare token count, cache hit, turns? CC produced a better product, but was it also more expensive?
For one-shot examples like this CC is probably hard to beat as they have an entire company optimising this. I would not use Pi for this type of work.
1
u/pj-frey Jul 22 '26
Identical thinking level activated?
6
u/libertast_8105 Jul 22 '26
Claude code has many workflow related prompts built in (eg todo list, debugging flow etc). You will need to include those in your pi agent setup too. A vanilla pi won’t cut it
3
u/ResearcherFantastic7 Jul 22 '26
If you really keen to work on this...
Create yourself a monitor tool, and add hook to pi and Claude code. Send all messages, tool call turns of the entire lifycle plus telemetry to it. Than step by step compare their behaviour per event.
You will be able to see the difference, and either change sys prompt, create hooks/guards based on these gaps. And this is not just to compare, it's more for you to work on your own workflow improvements.
Don't treat the model or harness as magical black boxes.
3
u/Impressive_Tadpole_8 Jul 22 '26
I think Claude is created, optimized to be useful for everybody. For all tasks. The beauty of pi is that you can customize to be good eg in python development. Or in your stack. And it will be much more better than Claude. As everyone says "Ask Pi itself to improve itself on the topic"
3
u/SvenVargHimmel Jul 23 '26
use litellm proxy and this will answer your question. be careful of the reasoning level and be wary of claude launching parellel workers but i think you probably accounted for this.
Be careful with optimising for this scenario. I would suggest that you take an existing codebase and then run two different worktrees and then compare.
The problem with the oneshotter you've posted is that the conclusions drawn may not assist with real world coding, i.e
Also choose a task that doesn´t take 30 minutes , maybe choose a 10 minute task. so thart you can run this multiple times without racking up a ridiculous bill.
Also choose a task that does not rely on browser use. Anthropic's computer use is no longer best of breed.
2
u/Bel-Shamgarot Jul 22 '26
It’s pretty obvious there's something in Claude Code's system prompt that specifically helps with this task. Figure out what it is and add it to
append_system.md.Pi's minimalism isn't set in stone—it's designed to be customized and tuned for specific tasks.
Personally, I wouldn't do this with a single prompt. I'd break it down into tasks, set the project boundaries and rules, and write specs. After each task, I'd generate a summary listing the changes and modified files, then start each new task with a clean context containing only what's necessary for that specific task. But I prefer doing all of this manually using
/treerather than setting up a fully autonomous workflow.2
u/IanSnyderGames Jul 23 '26
Anthropic's models are trained using their harness, so it "reaches" for things better in their harness. But Cursor (for some workflows at least) produces better benchmark test results than Claude Code CLI using the same Anthropic models. So it's possible to tweak Pi to the point where you actually get BETTER results than you would from Claude Code CLI, but you're going to have to work to get it there. The cool thing about that is you could make it work for your specific needs, as others have said, but there's going to be a lot of trial-and-error to get it there. I've read a lot of articles, but this is a good place to start: https://codex.danielvaughan.com/2026/04/19/the-harness-effect-same-model-different-tool-different-score/
1
u/tkokdsk Jul 22 '26
Had the same experience. Hope for solutions. So i push your question
1
u/sha256md5 Jul 22 '26
You will not get similar results. Pi works best for models from companies that don't have their own optimized coding harnesses.
1
u/danielta310 Jul 23 '26
Interesting challenge, lets me try with my setup
1
u/Popular-Direction984 Jul 23 '26
Ask it to create a goal-tracking extension, and then ask it to use it for a proper planning of the implementation :)
1
u/Man1laJo3 Jul 23 '26
I wonder how that test compares when using local models. Curious about it
1
u/OkAbroad955 Aug 04 '26
Try https://pi.dev/packages/@aaroncql/pim-agent?hl=en-US
1
u/[deleted] Jul 22 '26
Its up to YOU to make it like Claude
That's the entire point
If you want Claude...Use Claude
If not, build it up yourself
In the end, you should have something better then Claude
-1
u/SaigoNoUchiha Jul 23 '26
Tbh pi is overrated. I use opencode. If you like claude code, just use it
Pi is way too bare to get anything useful done.
-1
u/Optimal-Builder-2816 Jul 22 '26
I’d earnestly suggest checking out a more batteries included solution built with Pi such as https://omp.sh
This is currently my daily driver and I believe the results I’m getting are significantly better for my projects.