Feature hasn't been suggested before.
Describe the enhancement you want to request
Problem
When the agent is mid-task (executing a chain of tool calls), users can queue messages — but those messages wait until the entire task completes before the agent sees them. There's no way to inject context or corrections into the agent's current work without interrupting it.
Current behavior:
- Agent is mid-task (e.g., 10 tool calls into a refactor)
- User realizes the tests live in
__tests__/ not test/
- User types a correction → message is queued
- Agent finishes the entire task (possibly doing it wrong) → then sees the correction as a new turn
Desired behavior:
- Agent is mid-task
- User types
/btw the tests are in __tests__/ not test/
- Agent sees the message between tool calls during the current task
- Agent adjusts mid-flight without stopping or restarting
Proposed Solution
Add a /btw command (or equivalent mechanism) that injects a user message into the agent's current agentic loop between tool call iterations, rather than queueing it for after task completion.
How it would work
- User types
/btw <message> while agent is working
- Message is placed in a priority queue (separate from normal message queue)
- In the main loop (
prompt.ts), between loop iterations (after a tool call completes, before the next LLM call), check for pending /btw messages
- Inject as a user message in the conversation context before the next LLM call
- Agent sees the context and incorporates it — continues its current task, doesn't treat it as a new instruction
Key design points
- Non-interrupting: Agent doesn't stop or restart — it folds the info into its next iteration
- Lightweight: No new session, no subagent, no task management — just a message injection
- Distinct from queued messages: Queued messages start a new turn after task completion;
/btw messages augment the current turn
Use Cases
Course correction: "btw use the existing formatDate util instead of writing a new one"
Missing context: "btw that file moved to src/v2/ last week"
Preference: "btw don't add comments to the functions, just the module header"
Heads up: "btw I'm going to need the same change in the mobile app too, keep it portable"
Prior Art
- Claude Code recently shipped
/btw with exactly this behavior
- Claude Code issue #29224 — side-channel responses for queued messages
- Claude Code issue #30492 — priority message channel for mid-execution steering
Related Issues
Implementation Notes
The agentic loop in prompt.ts already iterates between tool calls. The injection point is natural — check a priority queue between iterations. The TUI already accepts input during agent execution. The delta is routing /btw-prefixed input to a priority queue instead of the normal message queue, and having the loop check it.
Feature hasn't been suggested before.
Describe the enhancement you want to request
Problem
When the agent is mid-task (executing a chain of tool calls), users can queue messages — but those messages wait until the entire task completes before the agent sees them. There's no way to inject context or corrections into the agent's current work without interrupting it.
Current behavior:
__tests__/nottest/Desired behavior:
/btw the tests are in __tests__/ not test/Proposed Solution
Add a
/btwcommand (or equivalent mechanism) that injects a user message into the agent's current agentic loop between tool call iterations, rather than queueing it for after task completion.How it would work
/btw <message>while agent is workingprompt.ts), between loop iterations (after a tool call completes, before the next LLM call), check for pending/btwmessagesKey design points
/btwmessages augment the current turnUse Cases
Course correction: "btw use the existing
formatDateutil instead of writing a new one"Missing context: "btw that file moved to src/v2/ last week"
Preference: "btw don't add comments to the functions, just the module header"
Heads up: "btw I'm going to need the same change in the mobile app too, keep it portable"
Prior Art
/btwwith exactly this behaviorRelated Issues
/btwis a simpler, targeted feature)Implementation Notes
The agentic loop in
prompt.tsalready iterates between tool calls. The injection point is natural — check a priority queue between iterations. The TUI already accepts input during agent execution. The delta is routing/btw-prefixed input to a priority queue instead of the normal message queue, and having the loop check it.