Scope a minimal fix for Alt+Enter slash-command queueing in pi coding agent
Session from pi-mono-sessions on Hugging Face by thomasmustier · MIT · condensed by Coders Talk
Investigate how to shrink a ~300-line proposed diff for queueing /compact, /reload and other slash commands via Alt+Enter into a smaller, maintainer-acceptable change, without touching code yet.
- +0Prompt · +0Investigate how to shrink a 300-line diff for queueing /compact, /reload etc. via Alt+Enter into a smaller, cleanly scoped change. Read only, don't touch code yet.
- +0mAgent did · +0mTraced Alt+Enter follow-up handling, built-in slash command routing, AgentSession.prompt/steer, compaction queue, extension command registration and skill expansion across interactive-mode.ts, agent-session.ts, agent.ts, slash-commands.ts and extensions/runner.ts.
- +21mAgent did · +21mSummarized current architecture: Alt+Enter follow-up bypasses the interactive built-in command router, so built-ins like /compact get queued as plain text and later sent to the model.
- +30mPrompt · +30mYes let's do that
- +36mAgent did · +36mDug into isCompacting, waitForRetry and auto-compaction flow to understand where a queued built-in command would need to hook in.
- +39mAgent did · +39mDrafted a minimal 'Option A' PR scope: on Alt+Enter during streaming/compaction, detect built-in slash commands, refuse to queue them as text, warn instead, and keep editor content intact.
- Break · 1h 52m away, not counted
- +39mPrompt · +39mLet's do Option C instead — try to actually resolve this properly. Only exception: if Option C naturally builds on A, do one commit for A and a second for C.
- +40mAgent did · +40mInvestigated onInputCallback, getUserInput, restoreQueuedMessagesToEditor and existing follow-up/queue tests to find where a minimal post-turn command queue for Option C could attach without touching agent-core or extension APIs.
- +56mOutcome · +56mNo code changed; ended with an agreed two-commit plan — Commit 1 (Option A) blocks queueing built-in slash commands as text via Alt+Enter, Commit 2 (Option C) adds a minimal post-turn command queue/flush scoped to InteractiveMode only.
Next time I'd open by naming the target diff size and the exact commands in scope up front, since that framing is what pushed the agent toward a maintainer-friendly two-commit split instead of one big change. Pushing back with 'let's do Option C, but build it on Option A if possible' was the correction that actually shaped a scoped, reviewable plan rather than a monolithic feature. No code was written this session — it was pure investigation and scoping, which is exactly what I asked for.