Reviewed the malformed-output issue from the screenshot showing
Claude CLI replies being continued as one large unformatted blob inside
pi
Inspected the pi extension at
~/.pi/agent/extensions/custom-provider-claude-cli/ and
identified the prompt-shaping issue in
format-context.ts
Confirmed the old formatter flattened prior turns into
User: ... / Assistant: ... lines and ended
with Assistant:, which likely encouraged continuation of
prior assistant text instead of a fresh reply
Updated format-context.ts to serialize prior turns as
numbered role sections with fenced text blocks and stronger
resume instructions: treat transcript as prior context, answer only the
final user message, and preserve normal markdown formatting
Left the execution-side provider code unchanged in
index.ts; only the transcript formatting shim changed
Recommended /reload in pi to activate the extension
update
Next: reload pi and verify the fix against a
previously failing conversation transcript; if blobs persist, build a
small repro harness around the extension formatter/provider path
Tasks created
Decisions
Keep the fix minimal and local to the transcript formatter instead
of changing the provider streaming logic first
Session 13:35 (wai / beads
sync cleanup)
Diagnosed root cause of agents running stale
bd sync --from-main: hardcoded in wai's
managed block generator (src/managed_block.rs) and
wai close CLI hints
(src/commands/close.rs)
Fixed wai to replace the hardcoded sync step with a
generic bd hint that defers to the installed CLI —
committed bf66bc0, pushed to
cv:charly-vibes/wai.git
Swept 14 repos and removed all active
bd sync --from-main references: atril, bichos, dont, fotos,
khipu, ruta, wai, SundaeVolatility, chacana, elegua, poco, REPLy.jl,
titi, nayra
Confirmed no active references remain outside archived/historical
material and tests
Next: optionally sweep for plain
bd sync mentions (not just --from-main)