[BUG] Numbered lists that start at 1 are always in order even when they shouldn't
Resolved 💬 2 comments Opened Mar 24, 2026 by thecristidima Closed Apr 22, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Asking Claude to sort some items and output them as a numbered list causes it to use markdown which then causes the numbering to be off.
Steps to Reproduce
Use this prompt
❯ I have the following six items. I want you to group them in two categories (letters) and number the items chronologically (timestamp is an int) across all items (1-6).
For example if the first item in the second category is the first item chronologically, that one will be 1, and so on.
The items are
A 100 second
A 110 third
A 130 fifth
B 90 first
B 120 fourth
B 140 sixth
Give the output as
A:
n. message
m. message
...
B:
...
● A:
2. second
3. third
5. fifth
B:
1. first
2. fourth
3. sixth
❯ Do it again, but I want the output as A = [n: message, m: message, .. ], B = []
● A = [2: second, 3: third, 5: fifth], B = [1: first, 4: fourth, 6: sixth]
What Should Happen?
The first output should have the same ordering as the second one
A:
2. second
3. third
5. fifth
B:
1. first
4. fourth
6. sixth
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.81
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗