The Problem
You kick off an agent task. It starts reading files, editing code, running tests. Then you realize something — maybe you forgot to mention a constraint, or you spot it heading down the wrong path.
What do you do? Wait. You wait until the agent finishes its entire turn, then type your correction. By then it may have written three files you didn't want, run a test suite against the wrong branch, or gone deep into an approach you know won't work.
Interrupting an AI agent should be as natural as tapping a colleague on the shoulder.
Meet /note
Starting in v0.13.9, you can send a note to the agent while it's actively processing:
/note use the existing UserService, don't create a new one
/note skip the tests for now, focus on the API layer
/note actually, use PostgreSQL not SQLiteThe agent sees your note immediately — before executing its next tool call — and adjusts course.
Replacing /now (and the old /note)
In earlier releases, Loop mode had two commands: /note queued guidance for the next iteration, and /now injected it immediately at the next tool call. This was confusing — two commands for similar things, with a subtle timing difference most users didn't need to think about.
In v0.13.9, we simplified:
/notenow does what/nowused to do — immediate injection at the next tool call boundary- Plain text (just type and press Enter) handles what the old
/noteused to do — queued guidance consumed one per iteration /nowstill works as an alias in v0.13.9 but will be removed in a future version. Switch to/note
One command for urgent notes. Plain text for everything else.
How It Works
When you type /note <text> while the agent is processing, three things happen:
- Your note is queued — a toast confirms it was accepted
- The next tool call is intercepted — instead of executing, the agent receives your note as a
[USER NOTE]message - The agent responds — it acknowledges your note and decides whether to continue with the original action or change direction
The key insight: the agent was about to call a tool (read a file, run a command, edit code). Instead of executing that tool, we replace the result with your note. The agent sees it as if the tool returned your message — so it naturally processes and responds to it.
You: /note don't modify the database schema
Agent was about to: bash("npm run migrate")
Agent instead sees: [USER NOTE] don't modify the database schema
Agent responds: "Got it — I'll work within the existing schema..."After addressing your note, the agent decides on its own whether to retry the original tool call or take a different path.
Works Everywhere
/note works in both modes:
Normal Mode (interactive sessions)
Type /note any time you see the agent working. The note is stored in a dedicated state store and picked up by the middleware on the next tool call.
Loop Mode (autonomous loops)
In long-running loops, /note gives you a lightweight way to steer the agent without stopping the loop. No need for /pause — just drop a note and the agent adjusts on the next iteration.
If the loop is between iterations (idle), the note is queued and injected when the next iteration starts.
Design Details
A few things we got right:
- Latest wins — If you send multiple notes before the agent processes one, only the latest is kept. No stale queue buildup.
- Clean lifecycle — Once injected, the note is cleared. A "Injected" toast confirms delivery. No state leaks.
- Graceful fallback — If the agent's turn ends before the note is consumed (rare edge case), the note is prepended to your next prompt. Nothing is lost.
- No new keybinding — It's just a slash command. Type it in the input field like anything else.
Under the Hood
For the technically curious: /note is built on a middleware architecture.
Every tool call in Aii passes through a middleware chain before execution. The chain looks like this:
Agent decides to call a tool
|
v
+-------------------+
| PauseMiddleware | <-- handles /pause & /resume
+-------------------+
|
v
+-------------------+ +----------------+
| NoteMiddleware |<-----| NoteGate |
+-------------------+ | interface |
| | +-------+--------+
| | |
v v +-------+--------+
| | | |
no note | NoteGate NoteGate
| | (Normal) (Loop)
| | Zustand LoopController
v | store internal state
+--------+ |
| Core | +-----> Synthetic result:
| Tool |
|Executor| +----------------------------+
+--------+ | [USER NOTE] |
| don't modify the schema |
| [/USER NOTE] |
| |
| Tool "bash" was not |
| executed -- address the |
| user's note first. |
+----------------------------+NoteMiddleware sits between the pause system and the core tool executor. When a note is pending, it short-circuits the tool call and returns a synthetic result containing your note. When no note is pending, the call passes straight through to the real tool.
The key abstraction is the NoteGate interface — a simple contract with two methods: "is there a pending note?" and "the note was delivered." Normal mode and Loop mode each provide their own implementation of this interface, but the injection logic is shared. One middleware, two modes, zero duplication.
Try It
Update to v0.13.9:
npm update -g @aiiware/aiiStart a session, kick off a task, and type /note followed by your message. The agent will see it before its next action.
No more waiting. No more watching the agent go the wrong way. Just talk to it.