Summary
- RFC 9585 standardises an untagged
INPROGRESSnotice for long-running IMAP commands. That notice can mean measurable progress, an unknown quantity of remaining work, or nothing more than a server keeping the socket warm. - Completion still arrives in the command's tagged
OK,NOorBADresponse. Search results, copied state and every other command output need their own receipts;PROGRESSandGOALcannot stand in for them.
The bar reads 999 of 1,000. An operator sees one unit left. An automation sees a threshold crossed. A customer sees a promise that the work is as good as done.
The server has said none of those things.
In RFC 9585, 999 is a progress value inside an untagged IMAP OK response. The goal should be greater than progress, so the display may look nearly finished. But the goal may later move, progress may run backward, the command may end in failure, and the processed units may bear no relation whatsoever to the number of useful results. That line is evidence of activity under a server-defined counting model. It is not a completion receipt.
That narrow distinction is the whole value of the standard. IMAP commands can run long enough for a client to wonder whether the connection has quietly died. Before RFC 9585, a server could send prose such as "Still on it", but software had no consistent way to parse the claim. The Standards Track extension, published in May 2024, creates the INPROGRESS capability and response code so a client can recognise progress notifications without pretending they say more than they do.
Capability is the door, liveness is the heartbeat, numbers are the only thing that looks like evidence
A supporting server must advertise INPROGRESS in its CAPABILITY response. That advertisement means the server understands the extension and emits progress notifications. It does not promise a notice for every command. A command that finishes before the first suggested notification interval may produce none at all, and the extension permits notices for any command rather than requiring them for a fixed list.
Liveness is the next rung down. The server may send INPROGRESS purely to stop a client timing out and tearing down the connection. RFC 9585 recommends notices every 10 to 15 seconds when the server elects to use them. A bare notice carries no details at all: its command tag, progress and goal are read as NIL. It says, at most, that the server chose to emit a keepalive-shaped status line.
Measured progress is stronger, and still bounded. The optional detail tuple carries CMD-TAG, PROGRESS and GOAL. Progress is a non-negative count of processed items. Goal is an optional positive number that progress is expected to reach once the command completes. When the work refuses to be expressed as item counts, the RFC permits a percentage model with a goal of 100 and progress from 0 to 99.
The tuple is deliberately tolerant of incomplete knowledge. If progress is unavailable, both progress and goal are NIL. If progress is known but the total is not, goal is NIL. If the command tag is unavailable, or the original tag contains a closing square bracket, the tag becomes NIL too. With one command in flight, that may still be useful. With several, the client may no longer know which operation the pulse belongs to.
Even a complete tuple is not a stable schedule. Progress should ordinarily rise and goal should ordinarily stay put, but a conforming client must handle the opposite. When the goal changes or progress slips backward, RFC 9585 recommends reading the sequence as an earlier tranche having finished before the server discovered more long-running work. That is a recovery rule for the client. It is not a guarantee that the old denominator described the whole job, or that the revised number predicts the finish line.
The tagged response is the only receipt that closes the command
The protocol boundary becomes unmistakable in the response syntax. IMAP4rev2 uses untagged responses, prefixed with *, for data and status that do not complete a command. A completion result carries the same tag as the originating command: OK for success, NO for failure, BAD for a protocol error. RFC 9585 therefore requires INPROGRESS to appear inside an untagged OK and forbids it in a tagged response. Once the tagged response exists, the command is finished and a further progress notice would make no sense.
Activity can therefore precede any of the three outcomes. A tidy series of plausible numbers does not reserve an eventual OK. It cannot make a later NO surprising in protocol terms, and it cannot authorise a client to commit dependent work as if success had already landed.
Progress is not the result set, and the goal is not the match count
Completion is not the same as result authority either. RFC 9585's SEARCH example keeps the artifacts apart. Two progress notices report that 454 and then 999 items have been processed against a goal of 1,000. An untagged SEARCH response later supplies the matching message identifiers. Only after that does the tagged OK close the command. The goal is not the match count. The progress value is not the result set. The final OK says the command succeeded; the SEARCH output says what it found.
The RFC makes the limit explicit: a client must not treat progress values as authoritative for another purpose, and must not use GOAL in place of proper SEARCH output to work out how many messages sit in a folder. The same discipline applies to COPY. Processed units do not prove how many destination objects persisted, whether a retry duplicated work, whether a separate store has reconciled, or whether a user-facing workflow may safely advance.
Silence proves nothing, and neither does a steady stream of heartbeats
Absence is just as easy to misread. Until a server sends a notice, the client must assume progress zero and an unknown goal. A quick successful command may emit no progress line at all. A silent interval therefore does not prove that no work is happening, just as a stream of keepalives does not prove that useful work is happening. The protocol hands the client a signal, not omniscience.
Security: when the numbers themselves are hostile
Loose display logic turns into an implementation risk. A malicious server can send values crafted to trigger arithmetic exceptions, impossible ratios or excessive allocation. RFC 9585 tells clients to disregard invalid cases such as zero or negative goals, extreme values and progress greater than goal. A robust client should also keep the raw notices, reject ambiguous command binding when it matters, and treat goal revisions as events rather than silently repainting history.
The state machine operators should actually build
The useful operational model is small. First, record whether the capability was advertised. Then bind every notice to a connection, an authenticated session and a command tag where possible. Keep the raw sequence of progress and goal values. Separately collect the command's untagged output. Do not leave the executing state until the matching tagged completion response arrives. After success, reconcile whatever matters outside the protocol exchange.
That last step matters because a tagged OK is still a server's protocol receipt, not proof of every business consequence. A successful COPY response may be enough for one client action under the IMAP contract. It is not automatically proof that an archival pipeline indexed the copy, a legal-hold system observed it, a replicated store converged, or a customer notification went out. Every additional claim adds another system, and therefore another receipt.
RFC 9585 improves reality rather than disguising it. It makes long-running work observable and lets clients avoid pointless disconnects. Its restraint is also architectural guidance: capability is not use; a keepalive is not measured progress; measured progress is not completion; completion is not result cardinality; and a protocol result is not every downstream effect.
The bar may move. The authority to say "done" still lives somewhere else.
Sources
- RFC 9585: IMAP Response Code for Command Progress Notifications
- IETF Datatracker record for RFC 9585
- RFC 9585 errata record
- Development record for the IMAP INPROGRESS draft
- RFC 9051: IMAP4rev2
- RFC 5530: IMAP Response Codes
- RFC 2683: IMAP4 Implementation Recommendations
- RFC 5234: Augmented BNF for syntax specifications
- RFC 2119: requirement-level key words
- RFC 8174: clarification of BCP 14 key words
- IANA IMAP Capabilities registry
- IANA IMAP Response Codes registry
- Lu Heng: reality layers and symbolic power
- Lu Heng: running-code primacy
- Lu Heng: reality, not advocacy
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






