Skip to content

Queued user messages are silently dropped and missing from durable session history #3590

Closed

Description

@karelz

Short summary

Queued messages can disappear without being delivered to the agent or persisted in local session history, causing unrecoverable user-instruction data loss.

Affected version or release

GitHub Copilot App 1.0.83-5

Installation context

GitHub Copilot desktop app on Microsoft Windows 11 Pro, version 10.0.26200 (build 26200), 64-bit. The failure occurred in a local project session using a Git worktree.

What happened?

While an agent was working, the app UI showed "3 queued messages." One visible queued user instruction was:

If there is no way how to make it one-time setup, let's not do that at all

The agent never received that original message. After the user sent "WAKE UP", the agent received only that new message and repeated task-completion reminders; it did not receive the missing queued instruction.

The missing instruction was also absent from durable local session history. The local turns history contained the surrounding conversation, but not the original queued message. A local full-text search for "one-time setup" found only a later discussion quoting the screenshot, not the original queued message.

At least one additional queued message could not be identified because it was neither delivered nor persisted and was not fully visible in the screenshot.

This is data loss, not only a rendering or queue-display defect: user instructions can be silently dropped and cannot be recovered from durable local history.

Steps to reproduce

A deterministic reproduction is not yet known. The observed sequence was:

  1. Run an agent in a local project session.
  2. Send multiple follow-up messages while the agent is active so the app queues them.
  3. Observe the UI showing "3 queued messages."
  4. Allow the active work to continue. The queued instruction shown in the screenshot is never delivered to the agent.
  5. Send another message (WAKE UP) to prompt the session.
  6. Observe that the new message is delivered, but the earlier queued content is not.
  7. Inspect the local turns history and search the local full-text index for text from the missing queued message.
  8. Observe that the original queued message is absent from both durable stores.

The exact trigger that caused the queued messages to be dropped is unknown.

Expected behavior

Every queued user message should be delivered exactly once as an agent turn. Until delivery succeeds, the complete queued content should remain durably persisted and recoverable across UI updates, session wake-ups, restarts, and failures. If delivery cannot succeed, the app should keep the message visible and clearly report the failure rather than silently discarding it.

Additional context

  • Project session ID: bc71ad03-5e0a-4e21-80d4-7b7f1b55d298
  • Conversation/session ID: b665ef11-fd30-4acb-822b-503bcfc570f9
  • Screenshot evidence: the provided screenshot shows "3 queued messages" and the visible missing instruction quoted above.
  • Persistence check: the original queued instruction was absent from local turns history.
  • Full-text check: searching for "one-time setup" found only later messages discussing the screenshot, not the original queued message.
  • Related issue: github/app#1298 reported dropped messages and was closed as fixed in version 1.0.13. This observation on 1.0.83-5 may be a regression or a remaining queue-specific data-loss path.
  • github/app#3525 and github/app#3564 concern queued messages getting stuck; this report is specifically about queued content disappearing from both delivery and durable history.
  • Impact: silently lost instructions can make the agent continue with stale or incorrect requirements. Because the original content is not persisted, the user may be unable to determine what was lost or recover it.

Activity

  1. karelz commented on Sep 7, 2026

    @karelz
    Author

    I encountered another instance of the session becoming stuck, this time after the agent had apparently finished its work.

    The first follow-up message remained queued:

    OK, show me changes of sub-session, I want to review them

    I then sent:

    WAKE UP

    That did not recover the session. The UI changed from "1 queued message" to "2 queued messages", but neither message was processed. The composer also continued showing a spinning activity indicator.

    This suggests the problem is not limited to an individual queued message being dropped. The session's message-processing loop can remain stuck after the agent response completes, and sending another message does not restart it. New messages simply accumulate in the queue.

    The session with the first queued message:

    The session stuck with one queued message

    The same session after the wake-up attempt, with both messages still queued:

    The session stuck with two queued messages after WAKE UP

  2. karelz commented on Sep 7, 2026

    @karelz
    Author

    So, this happened several times to me ... enough to decide to manually rollback version.
    But older version, cannot read the data of new one (not surprising when I think about it).

    Image

    As a result, I am stuck with new version ;( ... and it is LOSING my data on regular basis -- that is show-stopper and BLOCKER, please fix it ASAP. Thank you!
    Or is there another workaround how to wake up the session and not lose my prompts?

    I would consider building some compat mechanism / data export to support roll backs - see #3595

    Without easy rollback, the impact is that I will think twice next time before upgrading to new version - I lost few hours of time working around the problems, checking, filing bugs, etc. ... not something I want to repeat anytime soon.

  3. oasahle commented on Sep 8, 2026

    @oasahle

    Same symptom on macOS, app + CLI 1.0.83-5, observed twice today (2026-09-08) in one long-running orchestrator session. Adding details that narrow the failure mode.

    What is different / additional

    • Not only composer messages. Cross-session send_session_message from child sessions was dropped in both delivery modes (enqueue and immediate). The user's own composer prompts were dropped too. Every sender received a success result with a message_id (session.send RPC completed … elapsed_ms=10-45).
    • The RPC path stays alive while the turn loop is dead. During the stall, session.mode.get (liveness probe) returned responsive three times, and a session.mode.set call was recorded in events.jsonl (session.mode_changed at 13:09:03Z). Only session.send produced nothing: no user.message event, no turn.
    • Correlation with autopilot turn end. Both stalls began at an assistant.turn_end in autopilot mode. Healthy turn ends show agentStop hook → sessionEnd hook → session.usage_checkpoint → userPromptSubmitted within ~2 s. The two failing ones stop after the sessionEnd hook: no usage_checkpoint, no follow-up, no idle event.
    • Nothing is replayed on resume. After the app restart at 12:17Z the session resumed (sessionWasActive: false) and the 14 dropped child messages + 2 dropped user prompts were gone.
    • The app does not watch the CLI child process. kill -TERM <cli-pid> made the CLI exit cleanly (its inuse.<pid>.lock was removed) but it stayed a zombie (ps STAT Z) for minutes; the app logged nothing. It only noticed when the session was opened in the UI: Session … not in memory, attempting to resume from disk, then spawned a new CLI and sent "Continue from where you left off."

    Timeline (UTC, one session)

    Time Event
    09:27:01 mode set to autopilot
    09:53:26 assistant.turn_end + hooks, then silence
    09:53–12:13 14 child sends + 2 user prompts: all session.send RPC completed, none in events.jsonl
    09:54, 11:43, 12:13 liveness probe → responsive
    12:17:06 app restart → session.resume; nothing replayed
    12:33:18 second assistant.turn_end + hooks, then silence
    12:31–13:09 5 more sends accepted, none delivered; session.mode.set succeeded
    13:13 SIGTERM → clean exit, zombie, app unaware
    13:16:09 UI visit → resume from disk, new CLI pid

    Expected

    1. session.send should fail, or the message should be persisted and replayed on resume, when the turn loop cannot start a turn.
    2. The liveness probe should not report responsive on session.mode.get alone; it should verify the turn loop.
    3. The app should observe child-process exit (SIGCHLD / stdio EOF) without a UI visit.

    How I measured

    # sends the app accepted for the target session
    grep -h 'sending message to session session_id="<id>' ~/.copilot/logs/github-app.*.log | cut -c1-30
    # event stream: shows the gap after the failing turn_end
    python3 -c "import json;[print(json.loads(l)['timestamp'][11:19],json.loads(l)['type']) for l in open('$HOME/.copilot/session-state/<id>/events.jsonl')]"

    Workaround for now: run orchestrators in interactive mode, and verify delivery by checking the target's events.jsonl for a user.message rather than trusting the sender-side success result.

  4. rumukh commented on Sep 10, 2026

    @rumukh

    Additional reproduction on Windows, Copilot App 1.1.17 / bundled CLI 1.0.83, observed on 2026-09-10. This closely matches the turn-end / accepted-but-undelivered cross-session-message failure described above, and the stale Running state in #3525.

    This also occurred in interactive mode, so the earlier suggested interactive-mode workaround does not cover this instance.

    Environment and observed sequence

    • Microsoft Windows 11 Enterprise, version 10.0.26200, build 26200.
    • A long-running local Git-worktree orchestrator session coordinating six child sessions.
    • Affected session ID: f094bc0f-2cfa-4dd9-b149-eec93493069a.
    • The user reported the orchestrator had died and opened a replacement session to take over. Existing child worktrees and commits were intact; messaging an existing child from the replacement session resumed real work successfully.
    • Both before and after the recovery message, get_sessions_status reported the affected original session as is_running: true, mode: interactive, awaiting_user_input: false, and awaiting_plan_approval: false.

    Correlated timeline (UTC)

    Time on 2026-09-10 Observation
    19:41:04.848 Last assistant.message, with no tool requests.
    19:41:04.850 assistant.turn_end.
    19:41:04.865-866 agentStop hook starts and completes successfully.
    19:41:04.866-875 sessionEnd hook starts and completes successfully. This is the final event in the target's events.jsonl.
    21:04:47.210 Replacement coordinator calls send_session_message for the affected session with delivery_mode: "immediate", requesting a handoff.
    21:04:48.654 Sender records successful tool completion: Message sent immediately to session 'Graphics upgrade plan'.
    21:10:12.593 Target event log remains unchanged: 70,242,310 bytes, last filesystem write at 19:41:04.9879987 UTC. There is no corresponding user.message, new turn, usage checkpoint, or idle event after the final hooks.

    At inspection, the affected CLI process was still alive (copilot.exe, PID 23460, launched by the desktop app). This is therefore not established as a CLI crash or process-exit handling issue. The event stream had been silent for about 89 minutes, including more than five minutes after the supposedly immediate message succeeded.

    The last external tool request in the target had already completed successfully at 19:41:02, before the final assistant message and turn-end hooks. The tail does not show an unfinished final tool request or a failed stop hook.

    Expected / impact

    The app should distinguish an idle or stalled turn loop from an actively running session. A successful cross-session send should have durable, observable delivery or a recoverable pending-message state; it should not report immediate delivery while no target event is recorded. A stalled session should surface a recoverable error rather than indefinitely blocking orchestration behind Running.

    In this case recovery required another coordinator to reconstruct the original session history, recover the six children's progress, and explicitly resume the remaining work. The original remained marked Running while that recovery proceeded.

    Scope of the evidence

    This is an observed reproduction, not a deterministic minimal trigger or a confirmed root cause. We did not restart/kill the affected process or exercise cancellation, so this report does not claim permanent message loss after restart, a cancellation hang, or a particular network/locking cause. Raw conversation/code logs are not attached; the timeline above contains only event metadata and the sender-side delivery result.

  5. impartshadow commented on Sep 12, 2026

    @impartshadow

    This is a queue-durability failure: the app treats "queued" as an in-memory UI state rather than a durably persisted one, so a message can be evicted from the queue without ever being written to the turns store or delivered as a turn.

    The report says the search for "one-time setup" "found only a later discussion quoting the screenshot, not the original queued message" — that's the tell. If the message had been persisted at enqueue time (even as a pending/unsent turn), the full-text index would have hit the original text, not just a later paraphrase. Instead the write path looks like: UI queue (memory) → [agent becomes available] → dequeue-and-persist-as-turn. If the dequeue trigger fires on the wrong condition (e.g., a new message like "WAKE UP" replaces the head-of-queue pointer instead of appending after it, or the queue is rebuilt from a stale in-memory snapshot when the session wakes), the pending entry is dropped between "queued" and "persisted" and never reaches either store. The fact that "at least one additional queued message" is unaccounted for at all — not even partially visible — is consistent with an in-memory list getting overwritten rather than truncated.

    The deterministic check: at the queue/turns boundary, assert that every enqueue operation is followed by a durable write (append to the local turns log or an equivalent WAL) in the same transaction, before the UI is allowed to report "N queued messages." Concretely: assert queued_count_in_memory == queued_count_in_durable_store on every queue-state read, and reject (or fail loudly) any dequeue that isn't preceded by a matching persisted-turn write for that same message ID. That turns "silently dropped" into "crashes/logs loudly," which is the whole fix.

    Honest uncertainty: I don't know whether the queue is backed by any durable store at all before delivery, or whether "WAKE UP" specifically triggers a queue-replace rather than a queue-append — confirming that would need the client's queue-management source or a debug log showing the enqueue/dequeue sequence around the wake event.

    Advisory SFA-2026-D57385AB48 · Full redacted write-up: https://impartshadow.github.io/echo-site/failure-cases/queued-user-messages-are-silently-dropped-and-missin-d57385ab48.html
    If this diagnosis is useful, react 👍 to this comment; if it is wrong, react 👎 — I use the verdict to choose what I investigate next.

  6. ellismg commented on Sep 29, 2026

    @ellismg

    Thanks for the detailed reports and logs here. Since the versions involved in these reports, we have shipped fixes for several causes of queued messages becoming stuck or sessions remaining incorrectly busy, including queue wakeup, idle-state recovery, session reconciliation, callback deadlocks, and notification delivery handling.

    We are closing this issue as addressed by those accumulated queue and liveness fixes. The latest confirmed report here used App 1.1.17, which predates those changes. If the live-session stall recurs on a current release, please open a new issue with the App version, platform, and session logs so that we can investigate the current failure independently.

    One narrower limitation remains: an accepted message that has not yet been consumed is not currently guaranteed to survive every App or session restart. We are tracking that durability work separately and considering it alongside the move toward in-process runtime hosting; this closure should not be read as a guarantee of restart-safe queued input.

  7. impartshadow commented on Sep 29, 2026

    @impartshadow

    Thanks — this resolves the broader stall report and narrows the remaining claim. My earlier comment overreached by inferring that the queue itself was only in memory; the evidence established accepted-but-undelivered input and a durability gap, not that implementation detail. I accept the closure based on the accumulated liveness fixes, with the restart-survival limitation tracked separately as you described.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions