[BUG] Claude Code in mid task / token compaction happens / user submits a "queued" task during compaction / claude resumes with new task and skips finishing the previous

Resolved 💬 2 comments Opened May 25, 2026 by traskmi Closed Jun 27, 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?

Claude Code was in mid task and a thought came up "Let me look at one more thing before implementing — where the install plan card renders the items to know exactly where to inject the warning:" -> token compaction happened -> during token compaction I submitted a "queued" task -> Claude resumed with new task and skips finishing the previous. I confirmed this by asking Claude and it was confirmed that the previos task was not completed:

The user is asking whether I finished implementing the setup type preference feature (Cabinet vs Desktop) that was in progress when the context was summarized. Looking at the summary, the work was NOT completed - the assistant had just read the paths panel HTML structure and planned the implementation, but no code changes were made.

Let me check the current state of the file to understand what's implemented and what's missing for the setup type feature.

No, I didn't finish — the summary cut off right before the implementation started. Let me pick up where I left off by reading the install plan card rendering section to find the injection point for the warning.

Error "report" from Claude Code:
Can't locate it automatically. The quickest way to get the version for the bug report:

In VSCode press Ctrl+Shift+P → type "Extensions: Show Installed Extensions" → find Claude Code → version is listed there
Or check Help → About in the Claude Code desktop app if you're using that.

For the bug report at https://github.com/anthropics/claude-code/issues, here's a ready-to-paste template:

Title: Queued message during context compaction causes in-progress task to be abandoned

Version: [paste version here]

OS: Windows 11 Home 10.0.26200

Interface: VSCode extension

Steps to reproduce:

Give Claude a multi-step coding task
While Claude is mid-implementation, context compaction triggers (the "Compacting…" state)
Type a new message and send it while compaction is running
Compaction completes and Claude resumes
Expected behavior: Claude finishes the interrupted task, then addresses the queued message — or at minimum acknowledges both

Actual behavior: Claude jumps directly to the queued message. The in-progress work is skipped entirely. The compaction summary described the unfinished work as "pending" but Claude treated the queued message as the new top priority.

Notes: In this case the compaction summary was detailed enough that the in-progress work could be manually recovered, but only because the user noticed and asked about it.

That should give them everything they need to reproduce it.

What Should Happen?

Claude Code should skip finishing a previous task, before moving on to another, when interrupted by token compression

Error Messages/Logs

here is a copy/paste directly from my Claude Code where you can see the interruption and where Claude picks up the new request without finishing the previous:
Good plan. The key insight is this should be a one-time preference, not something the user has to set every time — store it persistently, use it silently in the install plan to pre-deselect mismatched files with a clear explanation.

Let me look at one more thing before implementing — where the install plan card renders the items to know exactly where to inject the warning:

Read C:\vpinball\pinballmagic\index.html (lines 2064-2098)

image.png
520×253
back to the playboy issues. Is this another miss? Table is "Playboy" made by Bally - year 1978. We then show we have the .vpx for the same table/year. then we show a conflict on the back glass, yet it's clear we have the "Playboy (Bally 1978) (1).zip" which should be our back glass.

-- Compacted chat . auto . 170k tokens freed --

Let me implement the setup type preference feature as described in the summary. I need to read the current state of the index.html file to find the exact code locations for my edits.

Let me start by reading the relevant sections of the file.

Read C:\vpinball\pinballmagic\index.html (lines 2-51)
The user is reporting a bug: For the "Playboy" (Bally 1978) table, the install plan is showing a "Multiple back glass files — pick one" conflict, but one of the options is "PLAYBOY (STERN 2002) (1).zip" which is clearly for a different table entirely. The Stern 2002 back glass should NOT appear as an option for the Bally 1978 table card.

Let me look at the install plan code to understand how back glass files get grouped into the conflict picker. I need to read the relevant sections of index.html to find the buildInstallPlan function and understand the B2S grouping logic.

Now I'm examining the file to locate the code that handles back glass file grouping and conflict detection.


Here is the conversation after I let Claude finish with the "Queued" task:

I was trying to que this bug, did you finish on the previous task. the last thing you reported was "Let me look at one more thing before implementing — where the install plan card renders the items to know exactly where to inject the warning:"

The user is asking whether I finished implementing the setup type preference feature (Cabinet vs Desktop) that was in progress when the context was summarized. Looking at the summary, the work was NOT completed - the assistant had just read the paths panel HTML structure and planned the implementation, but no code changes were made.

Let me check the current state of the file to understand what's implemented and what's missing for the setup type feature.

No, I didn't finish — the summary cut off right before the implementation started. Let me pick up where I left off by reading the install plan card rendering section to find the injection point for the warning.

I asked about reporting this and if it's happened in the past, here was Claud's response:

What happened in this specific case
Fortunately nothing was lost here. The compaction summary was detailed enough that I picked up the setup type feature immediately at the start of this session and completed it — then your queued Playboy bug message came in mid-implementation (shown as a system reminder). Both got done.

Have items been lost in past sessions?
Possibly — hard to say for certain. The pattern to watch for is sessions where the context ran out while something was partially built (functions written but not wired up, HTML added but JS missing, etc.). From what I can see in the code and the backlog, everything tracked in the v2.x changelog looks complete. But the specific risk is work that was designed and described in conversation but never committed to the file before compaction — that's what the summary tries to catch but could miss.

If you ever feel like a feature behaves oddly or seems half-wired, flag it and I can audit the specific area.

Steps to Reproduce

Have Claude Code working on a complex task near the end of token compaction. When the threshold for tolen compaction is crossed and that task starts, "que" another new task and in my case Claud picked up the new task, abandoning the previously unfinished task

<img width="1185" height="561" alt="Image" src="https://github.com/user-attachments/assets/b63c1a7a-1a95-4205-852f-4c9e77247fcc" />

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

V.2.1.145

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

For the bug report at https://github.com/anthropics/claude-code/issues, here's a ready-to-paste template:

Title: Queued message during context compaction causes in-progress task to be abandoned

Version: [paste version here]

OS: Windows 11 Home 10.0.26200

Interface: VSCode extension

Steps to reproduce:

Give Claude a multi-step coding task
While Claude is mid-implementation, context compaction triggers (the "Compacting…" state)
Type a new message and send it while compaction is running
Compaction completes and Claude resumes
Expected behavior: Claude finishes the interrupted task, then addresses the queued message — or at minimum acknowledges both

Actual behavior: Claude jumps directly to the queued message. The in-progress work is skipped entirely. The compaction summary described the unfinished work as "pending" but Claude treated the queued message as the new top priority.

Notes: In this case the compaction summary was detailed enough that the in-progress work could be manually recovered, but only because the user noticed and asked about it.

That should give them everything they need to reproduce it.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗