Pi Coding Agent Runs Fully Local on Qwen3.8-27B via TensorSharp, Full Repro

fuzhongkai · reddit · 2026-11-11

The author got the Pi coding agent working end-to-end on TensorSharp, their native .NET local inference engine: read project, edit code, run tests, iterate — all inference local, plus a check that the agent didn't quietly rewrite tests to pass.

Setup:

Repro: source-build TensorSharp (includes a server-side fix preserving KV prefix across Pi tool-call rounds) → startup script loads model + drafter (12GB) → register a tensorsharp provider in Pi's models.json (OpenAI-compatible endpoint at 127.0.0.1:5000) → set as default. The config has no auth, so bind to localhost only.

Full example: github.com/zhongkaifu/TensorSharp/examples/pi-coding-agent.

Related event: Pi Coding Agent Runs Fully Locally via TensorSharp and Qwen3.8-27B(3 posts)→

Original post →

More from coding & agent

coding & agent channel →