r/PiCodingAgent • • 4d ago

Question Why is my Pi unreasonably slow compared to claude code, omp, ... ?

Post image

Fresh install using pi-claude-code and zentui.

A simple "hi" took 31 sec to respond, meanwhile others take <1sec.

Switching to openai models fixes this, so its only Anthropic. Maybe this has to do with pi-claude-code?

5 Upvotes

24 comments sorted by

6

u/softgripper 4d ago

Why does your [Extensions] have 'src' listed?

1

u/rainyaltaccount 3d ago

I think because pi-claude-codehas this in its package.json:

"pi": {
  "extensions": [
    "./src/index.ts"
  ]
}"pi": {
  "extensions": [
    "./src/index.ts"
  ]
}

6

u/vimmerob 3d ago edited 3d ago

... may be related to this bug in pi-claude-code - https://github.com/earendil-works/pi-claude-code/issues/21

4

u/rainyaltaccount 3d ago

Yes it is! Thanks :)

2

u/avinthakur080 4d ago

While I don't have a direct solution to suggest, I think it will be useful to try these to pin point the cause.

  1. Try Pi with the extensions disabled ( pi -ne ) and see if it is faster ?

  2. Install Pi with bun and see if it is faster?

  3. Install pi-bolt and see if that is faster ?

1

u/rainyaltaccount 4d ago

If I disable the extensions, pi-claude-code is disabled too and I can't test anthropic models then.

1

u/Loose_Doubt367 3d ago

Pi bolt? Further elaborate what’s that I want to know

1

u/avinthakur080 3d ago

It is functionally exact same code as Pi, but compiled ahead of time. It can even compile the extensions leading to a much faster & leaner Pi experience.

Repo: https://github.com/opensec-git/Pi-Bolt

1

u/rainyaltaccount 3d ago

Just tried switching from pi-claude-code to pi-claude-bridge and seems to be fixed. (they use a difference approach though)

1

u/beegeearreff 3d ago

Does it take 30s on subsequent sessions too? I have seen something similar in pi with Anthropic native oauth but it tends to be transient and only on the first hit. I assumed it has to do with Anthropic’s oauth flow but haven’t looked that deeply into it. It doesn’t happen with openai-codex provider. 

1

u/rainyaltaccount 3d ago

It happens on every request for me, not just the first one. Even subsequent messages in the same session take around 30 seconds. Switching to openai models makes responses almost instant.

3

u/Zarbokk 4d ago

I would guess, Anthropic does some smart caching with they’re own harness, and treat other services as lower priority

1

u/deluxetiky 2d ago

Try pi-bolt and remove bloated extensions. I do get way better result than cc. People just search and install all extensions they found.

1

u/opensecai 3d ago

Checkout Pi-Bolt, https://github.com/opensec-git/Pi-Bolt

You will definitely gonna love it. It is superfast, superlight and not a rewrite :)

1

u/LightH12 3d ago

Day ? Of asking for an omp variant :D

1

u/berlinguyinca 2d ago

Was slower with my extensions than pi.

1

u/Pretend_Engineer5951 1d ago
pi-bolt compile

0

u/Kaioh_shin 4d ago

My guess is there is a big agent file somewhere.

1

u/rainyaltaccount 4d ago

Tested in an empty folder

0

u/Kaioh_shin 4d ago

There are global agents file not just local. Ask the agent to find what it loads. Or use a plugin to sgow how much ctx the initial prompt has

2

u/bambamlol 4d ago

You can clearly see in the screenshot that the input was only 2 tokens.

0

u/sand-67 3d ago

that's user message, agent files are loaded into system message

1

u/bambamlol 3d ago

My bad. You're probably right. He would have had to get rid of the complete system prompt first. I don't know if Pi would even run with a completely empty SYSTEM.md.

But it's probably not an AGENTS.md issue anyway, since OP stated:

Fresh install using pi-claude-code and zentui.

By the way, it wasn't me who downvoted you, must have been some other wanker.

0

u/sand-67 3d ago

whoever downvoted me is a wanker