Skip to content

Proposal: TokenPilot support for pi #97

Description

@boxabirds

LightRSI supports Claude Code, Codex, OpenClaw and DeepSeek Harness. Two other popular open-source coding agents are:

How it would plug in. pi has an in-process extension API, so no proxy is needed. The adapter would reuse the shared code from #95 and #96:

TokenPilot feature pi hook
Stable prefix before_agent_start system-prompt sections
Reduction the request-local context hook
Eviction (opt-in) turn_end context edits, applied before pi's own compaction
Recovery a native memory_fault_recover tool, since pi has no MCP

Early numbers. I ran a 4-turn coding session with llama-server, Qwen3-1.7B and a 32k context window, on a prototype. Prompt tokens processed went from 37,465 to 4,994 (−87%). Without the adapter, pi had to compact the conversation; with it, it didn't. I'll re-measure on the final code and put the results in the PR.

Plan: one PR, once #96 has merged. Would you be happy to take it?

Activity

  1. Xubqpanda commented on Oct 2, 2026

    @Xubqpanda
    Collaborator

    Thanks @boxabirds — yes, absolutely, we'd be happy to take it. #96 is already merged, so the shared eviction core and the OpenCode adapter are both in main now.

    It's great to see pi in the works too — an in-process integration with no proxy would be a first for us. Just open the PR whenever it's ready, and don't worry about the repo-side chores (CI wiring, docs, README host list) — we can handle those on our end.

    Thanks again for the continued contributions, it's been a pleasure reviewing them.

  2. added a commit that references this issue on Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions