-
-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Description
Description
When using HAPI to wrap Claude Code, certain messages appear as raw JSON in the PWA chat UI instead of being filtered.
Environment
- HAPI: 0.15.2, macOS arm64
- Claude Code: latest
Steps to Reproduce
- Start HAPI Hub + session
- Send any prompt triggering tool use
- Raw JSON blocks appear in chat
Root Cause
In the embedded JS bundle (index-BVqzYkZt.js):
-
F7 passes raw event data through without filtering:
function F7(e){return!ve(e)||typeof e.type!="string"?null:e} -
q7 only suppresses "codex" type in HD fallback, not "event":
function q7(e){return ve(e)&&e.type==="codex"} -
HD fallback serializes unhandled messages as JSON text via
Ra(t.content).
Suggested Fix
- F7: return null for all events (or transform to displayable format)
- q7: also suppress "event" type (or any type H7 can't parse)
Workaround
Binary patch (same byte length, in-place r+b write + codesign).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels