Repository navigation
fix(pi): use leverage's client field and start sessions with the first prompt - #1
Merged
Merged
Conversation
# Conflicts: # src/index.ts # src/render.ts # src/session.ts # src/workspace/ui.ts # src/workspace/view.ts
aripiprazole
marked this pull request as ready for review
October 14, 2026 02:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Pi cannot use a session on the current Leverage server. On 3 Oct Leverage changed two message shapes, and Pi still sends and reads the old ones.
harnesstoclient. Pi requiresharness, so it rejects every session read that has a message, never sees its own sends confirmed, and drops teammates' messages. Leverage also ignored Pi'sharness: "pi", so nobody saw Pi as the sending app.Now Pi reads and sends
client, and its first prompt (with any images) creates the session.The fake Leverage server in the tests now matches the real one, so these tests fail on main.
Verification
clientand refuse an empty create, then ranbun run teston the old code: 9, then 6 tests fail (sends not confirmed, sessions not created).bun run checkwith the fix: format, lint and typecheck clean, 116 tests pass, build succeeds.client: "pi"./leverage newand a first prompt fail with "Invalid event" and create no session. Reopening a session fails with "invalid data … (messages.0.harness)".