Skip to content

Session event delivery permanently fails after one 120s host-ack timeout ("session host did not acknowledge the <event> event within 120s"); session unusable until resume #5100

Description

@ElliotChong-MS

Describe the bug

In long-running interactive sessions, prompt submission fails with:

Execution failed: Error: Request session.send failed with message: session event delivery failed:
session host did not acknowledge the tool.execution_partial_result event within 120s

After the first timeout, every later event delivery to that session host fails immediately with the same message, and the session accepts no more input. The only way to recover is to exit and run copilot --resume (or /restart).

Related: #5018. It has the same failure that never clears and the same session.send failed ending, but on the permission.requested 5-second path. This report covers general session event delivery with the 120s deadline, and the trigger appears to be the Node main thread becoming unresponsive.

Affected version

GitHub Copilot CLI 1.0.94 (observed). Also seen on 1.0.90–1.0.92 builds, Oct 1–9. Not yet observed on 1.0.95-3.

Steps to reproduce the behavior

Not deterministic. Conditions present in every occurrence:

  1. Start an interactive session (copilot) and work in it for many hours: frequent shell tool calls, subagents, several auto-compactions, and at least one copilot --resume of the same session.
  2. Let the context grow large (model request bodies of ~0.4–2 MB).
  3. Eventually a turn stalls. About 120s later, the next prompt submission fails with the error above, and every later prompt fails the same way until exit and --resume.

Expected behavior

  • One late acknowledgement shouldn't break event delivery for the rest of the session. Delivery should resume once the host responds, or the session should reconnect automatically without exit and --resume.
  • The Node main thread shouldn't stall for over 120s in long or large sessions.

Additional context

Environment: macOS 26.7 (25G229), arm64 (Apple Silicon), Ghostty terminal, zsh.

Log observations (~/.copilot/logs/process-*.log, several processes):

  • The event type in the message varies: tool.execution_partial_result, session.usage_record, prompt_cache_break, session.managed_settings_resolved, session.background_tasks_changed. The event named is whichever one was waiting when the deadline passed. tool.execution_partial_result shows up most often because one is sent for each chunk of shell output.
  • The failure never clears. Only the first failure waits the full 120s. After that, every delivery fails within milliseconds with the identical message, which still names the original event. One process logged it 1,645 times.
  • Onset example:
    19:28:07 [pending_request_flow] Waiting for detached host delivery flush
    19:28:44 [pending_request_flow] Detached host delivery flush finished {"acknowledged":true}   <- 37s, host already lagging
    19:28:46 [event_sink] Native model usage projection started                                 <- sends prompt_cache_break
    19:30:46 [pending_request_flow] ... session host did not acknowledge the prompt_cache_break event within 120s
    19:30:47 [github_telemetry::node_memory] Node memory snapshot timed out
    
    62 more Node memory snapshot timed out lines followed in that process, so the Node main thread was unresponsive. This isn't a delivery-transport problem.
  • Affected processes: long-running (15+ hours, resumed sessions), ~1.7 GB of memory. Between stalls, the main thread was idle in kevent, so the stalls come in bursts rather than as a constant spin.

The full logs contain private repository content and can't be shared publicly. I can provide filtered excerpts on request.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions