Repository navigation
fix(mobile): keep idle agent conversations available - #22646
vesanieminen wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Important
The transcript-retention bypass is wider than the guard it sits next to: it also lets a pane whose PTY status is still working/permission skip the early return, and the final projection then republishes that non-idle state under a non-agent title. That re-enables the stuck-spinner class (#1437) the nonAgentTitle branch exists to clear. Reproduced through the real projection path (details inline). The new test passes with the fix but only because it uses null for the PTY status.
Reviewed changes
- Idle transcript retention —
buildRuntimeMobileAgentStatusno longer returns an empty status under a non-agent title when aproviderSessionis known, so headless serve keeps the saved conversation addressable after the turn ends. - Agent-type fallback — the identity-only final projection fills
agentTypefrom the saved provider-session row (hookRow.providerSessionAgentType) when no launch hint or live owner remains, which is whatresolveMobileNativeChatneeds. - Regression tests — new
runtime-mobile-idle-chat.test.tspins idle publication, restored identity, pane isolation, identity removal, hook status, title truthfulness, and pending permissions.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe fallback agent-status builder now sets the state to Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to Idle conversations remain identifiable without showing stale activity. No actionable merge-blocking issue was established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 69390c25-a931-4bd7-a174-751e11e07310
📒 Files selected for processing (2)
src/main/runtime/runtime-mobile-agent-status-builder.tssrc/main/runtime/runtime-mobile-idle-chat.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run re-reviewed the delta since the prior pullfrog review (ad85e55): one follow-up commit (89bb44e) tightening the idle-transcript publication.
- Non-agent title now publishes
done— the identity-only final projection forcesstate: 'done'under a non-agent title before deriving state frompty.lastAgentStatus, closing the hole where the new bypass could republishworking/blockedand revive the #1437 stuck spinner. - Regression test widened — the shell-pane case parameterizes over
null | 'working' | 'permission'and assertsdonefor each, so the guard is actually pinned. - Rename case added — renaming a working terminal to a non-agent title now asserts the activity retires while the transcript address survives.
Both prior pullfrog threads (the builder bypass and the test case) were addressed and resolved. src/main/runtime/runtime-mobile-idle-chat.test.ts passes 12/12 locally.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Possibly related: #22505 |
|
Closing as superseded on |

ELI5
Mobile chat can go blank when Codex finishes a reply, and the Chat option can disappear for an idle session. Keep the saved conversation address available while the agent is idle.
What Changed
The host's mobile status builder no longer discards a known provider session solely because the terminal has a non-agent title. Its identity-only fallback also includes the saved provider name when no launch or live ownership hint remains, so mobile can still recognize a supported chat session. Existing activity and permission checks remain in place.
Why
Conversation identity lasts longer than an active turn. Reusing the execution host's retained identity avoids mobile-side caching, title guessing, or a Linux-only process scan. This also covers restored rows that already contain an identity; it does not recover identities that were never saved.
Linked Issue
Related to #20408.
Visual Proof
Pending before/after mobile capture; kept as a draft. The reporter confirmed that idle chat works with a local 1.4.210 bundle patch addressing these publication failures. That patch also had additional recovery logic, so this is not a claim of device validation for this exact source change.
Testing
Linux, Node 24: five targeted suites pass (46 tests), covering idle publication, restored identity, pane isolation, identity removal, existing hook status, title truthfulness, and pending permissions. The new regression suite fails six of eight cases against the original builder and passes all eight with the fix.
pnpm tc:nodeandpnpm run check:code-quality:changedpass. Full build, full suite, macOS, Windows, and live SSH/device validation remain for CI or follow-up testing.AI Disclosure
Prepared with OpenAI Codex (GPT-6).
Review
The publication retains the existing
agentStatus.agentTypeandproviderSessionfields; there are no new wire fields, opcodes, or client requirements. Older mobile clients already consume these fields while an agent is active. The execution host remains the identity authority, and folder workspaces use the same path.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
No platform-specific process access or filesystem lookup is added. The running local patched installation was not modified.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)