r/PiCodingAgent • • 29d 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?

7 Upvotes

25 comments sorted by

7

u/vimmerob 28d ago edited 28d ago

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

4

u/rainyaltaccount 28d ago

Yes it is! Thanks :)

6

u/softgripper 29d ago

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

1

u/rainyaltaccount 28d ago

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

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

2

u/rainyaltaccount 28d ago

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

2

u/avinthakur080 29d 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 ?

2

u/rainyaltaccount 29d ago

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

1

u/Loose_Doubt367 29d ago

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

1

u/avinthakur080 28d 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/beegeearreff 29d 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 28d 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 29d ago

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

1

u/deluxetiky 27d 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 29d 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 28d ago

Day ? Of asking for an omp variant :D

1

u/berlinguyinca 27d ago

Was slower with my extensions than pi.

0

u/Kaioh_shin 29d ago

My guess is there is a big agent file somewhere.

1

u/rainyaltaccount 29d ago

Tested in an empty folder

0

u/Kaioh_shin 29d 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 29d ago

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

1

u/sand-67 29d ago

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

1

u/bambamlol 28d 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.

1

u/sand-67 29d ago

whoever downvoted me is a wanker