[BUG] Mobile Code tab: unsent composer draft discarded on back navigation and app backgrounding (Chat tab unaffected)

Status Open
Maintainer reply None cached
Activity 0 comments · opened Sep 24, 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?

In the Claude mobile app's Code tab (Claude Code cloud sessions), an unsent draft in the message composer is discarded as soon as I tap the back arrow to leave the session. It is also lost if the app stays in the background long enough for the OS to reclaim it. The Chat tab keeps drafts in both cases.

| Action after typing an unsent draft | Code tab | Chat tab |
|---|---|---|
| Back arrow, then reopen the session | Draft lost | Draft kept |
| Brief switch to another app and back | Draft kept | Draft kept |
| Long switch to another app (OS likely reclaims the app) | Draft lost | Draft kept |

Impact: user-written text is lost. On mobile, writing a complex prompt often means checking another session or app (a PR number, an error message, a file name). Each check risks retyping the whole prompt, so long prompts on mobile aren't practical.

What Should Happen?

The unsent draft stays in the composer, saved per session ID, when I go back to the session list and reopen the session, and after the app is backgrounded and reclaimed by the OS. This matches how the Chat tab behaves, and how Desktop is described in #94831 (drafts are "normally saved per session").

Error Messages/Logs

Steps to Reproduce

  1. Open an existing Claude Code session in the Claude mobile app (Code tab).
  2. Type text into the message composer. Do not send it.
  3. Tap the back arrow to return to the session list.
  4. Reopen the same session.
  5. The composer is empty.

To compare: do the same steps in a Chat tab conversation, and the draft is kept.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude mobile app <version>

Platform

Other

Operating System

Other

Terminal/Shell

Other

Additional Information

Mobile app: <iOS or Android, OS version>, Claude app <version from Settings > About>

Analysis (inferred from the behaviour table, not checked against source): the Code tab composer keeps the draft only in the session screen's in-memory component state. That state is destroyed when the screen is popped (back arrow) or when the OS terminates the backgrounded app. The Chat tab already saves drafts across both cases, so the likely fix is to connect the Code tab composer to the same draft storage Chat uses, keyed by session ID.

Related (other clients, same class of bug):

  • #34596 VS Code: input lost when switching chats
  • #94831 Desktop split view: drafts disappear when sessions swap panes
  • #55578 Request: draft text persists when switching chats

View original on GitHub ↗