You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Session restoration can attach messages to a non-existent or wrong conversation task #11769
area:agentAgent workflows, conversations, prompts, cloud mode, and AI-specific UI.area:window-tabs-panesWindow, tab, pane, and workspace layout management.bugSomething isn't working.needs-infoMore issue-specific reporter detail is needed before the problem can be confidently triaged.repro:mediumThe report suggests a plausible repro path, but some uncertainty remains.triagedIssue has received an initial automated triage pass.warp:internal-reportReported internally by the Warp team (must include a link back to the internal report)
Session restoration can fail with an error like tried to add messages to non-existent task. In at least one case, starting a new conversation appeared to continue an old conversation instead of creating an isolated new one. Another reproducible case loses conversations after restarting Warp.
Warp may attempt to add restored messages to a non-existent task.
A newly started conversation may continue an older conversation.
Conversations can be lost after restarting Warp.
Expected behavior
Restored conversations should remain associated with the correct existing conversation/task, and starting a new conversation should not continue an unrelated older conversation.
This appears to be an agent session-restoration routing bug. I found related restored-conversation issues, but this report has a distinct task-ID/conversation-association failure mode, so it should stay separate for now.
I have a few follow-up questions before I can narrow this down:
Can you attach a redacted screenshot or short recording showing the restored pane when the new or wrong conversation appears?
What minimal sequence reliably triggers the tried to add messages to non-existent task error after restarting Warp?
Reply in-thread with those details and the triage workflow will automatically re-evaluate the issue and update the diagnosis, labels, and next steps.
Maintainer details
I concluded that restored agent conversations can route follow-up or replay messages to a stale/mismatched task or conversation after restart, causing missing restored conversations, wrong-conversation continuation, or task-not-found failures..
Triage summary
This looks like an agent conversation/session-restoration bug, not a shell or terminal-emulation issue. The report combines three related symptoms: restored messages can target a missing task, a new conversation can appear to continue an older one, and conversations can disappear after restart.
Code-path notes
The most relevant restore flow is:
app/src/pane_group/pane/terminal_pane.rs snapshots conversation_ids_to_restore and an optional fullscreen active_conversation_id.
app/src/persistence/sqlite.rs persists and reloads those terminal-pane conversation IDs.
app/src/ai/restored_conversations.rs stores restored conversations by AIConversationId, then app/src/pane_group/mod.rs consumes them while recreating terminal panes.
app/src/terminal/view/load_ai_conversation.rs restores AI blocks and calls BlocklistAIHistoryModel::restore_conversations; it currently picks the active conversation from the last restored AI block, while the saved fullscreen Agent View conversation is restored later.
app/src/ai/blocklist/history_model.rs routes response/client actions by active conversation, response stream, and task ID.
app/src/ai/agent/conversation.rs handles AddMessagesToTask by removing/updating the exact task ID from TaskStore.
app/src/ai/agent/task_store.rs has an optimistic_root_task_id alias so get() can resolve a stale optimistic root ID after root-task upgrade, but paths like remove(&task_id) do not appear to apply that alias. A delayed/restored AddMessagesToTask that still references the old root task ID can therefore become TaskNotFound.
Shared-session/ambient restore adds another routing surface: app/src/ai/blocklist/controller/shared_session.rs can reuse a selected empty conversation for an incoming stream and can rebind forked conversation tokens, while app/src/terminal/shared_session/replay_agent_conversations.rs reconstructs CreateTask and AddMessagesToTask events for replay.
Likely root cause
Medium confidence: restored or replayed agent client actions are being associated with stale task IDs or with a conversation selected/restored out of order. The task-not-found symptom is consistent with the current TaskStore alias only being honored by lookup paths, not by the remove/update path used when adding messages. The wrong-conversation symptom is also consistent with startup restore choosing one active conversation from restored block order while Agent View and shared-session token binding can later select or rebind a different conversation.
Duplicate check
I enumerated all open issues and recent closed issues. Related issues include #11751 and #11252, but I did not mark this as a duplicate because this issue is specifically about task-ID/conversation routing during restore and includes the non-existent task failure mode.
Question reasoning
Can you attach a redacted screenshot or short recording showing the restored pane when the new or wrong conversation appears? — The report describes visible restored-conversation state, and visual evidence would help distinguish a display-only Agent View selection problem from messages actually attaching to the wrong conversation.
What minimal sequence reliably triggers the tried to add messages to non-existent task error after restarting Warp? — A minimal sequence is needed to know whether the failing path is normal app startup restore, update/restart restore, shared-session replay, fork/resume, or Agent View fullscreen restoration.
This is my automated analysis and may be incorrect. A maintainer will verify the details.
area:agentAgent workflows, conversations, prompts, cloud mode, and AI-specific UI.area:window-tabs-panesWindow, tab, pane, and workspace layout management.bugSomething isn't working.needs-infoMore issue-specific reporter detail is needed before the problem can be confidently triaged.repro:mediumThe report suggests a plausible repro path, but some uncertainty remains.triagedIssue has received an initial automated triage pass.warp:internal-reportReported internally by the Warp team (must include a link back to the internal report)
Activity
warp-for-oss commentedon May 27, 2026
@seemeroland
Here's what I found while triaging this issue:
This appears to be an agent session-restoration routing bug. I found related restored-conversation issues, but this report has a distinct task-ID/conversation-association failure mode, so it should stay separate for now.
I have a few follow-up questions before I can narrow this down:
tried to add messages to non-existent taskerror after restarting Warp?Reply in-thread with those details and the triage workflow will automatically re-evaluate the issue and update the diagnosis, labels, and next steps.
Maintainer details
I concluded that restored agent conversations can route follow-up or replay messages to a stale/mismatched task or conversation after restart, causing missing restored conversations, wrong-conversation continuation, or task-not-found failures..
Triage summary
This looks like an agent conversation/session-restoration bug, not a shell or terminal-emulation issue. The report combines three related symptoms: restored messages can target a missing task, a new conversation can appear to continue an older one, and conversations can disappear after restart.
Code-path notes
The most relevant restore flow is:
app/src/pane_group/pane/terminal_pane.rssnapshotsconversation_ids_to_restoreand an optional fullscreenactive_conversation_id.app/src/persistence/sqlite.rspersists and reloads those terminal-pane conversation IDs.app/src/ai/restored_conversations.rsstores restored conversations byAIConversationId, thenapp/src/pane_group/mod.rsconsumes them while recreating terminal panes.app/src/terminal/view/load_ai_conversation.rsrestores AI blocks and callsBlocklistAIHistoryModel::restore_conversations; it currently picks the active conversation from the last restored AI block, while the saved fullscreen Agent View conversation is restored later.app/src/ai/blocklist/history_model.rsroutes response/client actions by active conversation, response stream, and task ID.app/src/ai/agent/conversation.rshandlesAddMessagesToTaskby removing/updating the exact task ID fromTaskStore.app/src/ai/agent/task_store.rshas anoptimistic_root_task_idalias soget()can resolve a stale optimistic root ID after root-task upgrade, but paths likeremove(&task_id)do not appear to apply that alias. A delayed/restoredAddMessagesToTaskthat still references the old root task ID can therefore becomeTaskNotFound.app/src/ai/blocklist/controller/shared_session.rscan reuse a selected empty conversation for an incoming stream and can rebind forked conversation tokens, whileapp/src/terminal/shared_session/replay_agent_conversations.rsreconstructsCreateTaskandAddMessagesToTaskevents for replay.Likely root cause
Medium confidence: restored or replayed agent client actions are being associated with stale task IDs or with a conversation selected/restored out of order. The task-not-found symptom is consistent with the current
TaskStorealias only being honored by lookup paths, not by the remove/update path used when adding messages. The wrong-conversation symptom is also consistent with startup restore choosing one active conversation from restored block order while Agent View and shared-session token binding can later select or rebind a different conversation.Duplicate check
I enumerated all open issues and recent closed issues. Related issues include #11751 and #11252, but I did not mark this as a duplicate because this issue is specifically about task-ID/conversation routing during restore and includes the
non-existent taskfailure mode.Question reasoning
tried to add messages to non-existent taskerror after restarting Warp? — A minimal sequence is needed to know whether the failing path is normal app startup restore, update/restart restore, shared-session replay, fork/resume, or Agent View fullscreen restoration.This is my automated analysis and may be incorrect. A maintainer will verify the details.
Powered by Oz