Metadata
| Status | done |
|---|---|
| Assigned | agent-714 |
| Agent identity | f51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e |
| Created | 2026-04-27T15:44:23.306771457+00:00 |
| Started | 2026-04-27T15:44:58.702617426+00:00 |
| Completed | 2026-04-27T16:02:44.932028967+00:00 |
| Tags | eval-scheduled |
Description
Description
User cannot get rid of .chat-4 in the TUI. Switching to that tab brings up a modal:
This session is 1d 18h old and 309.7k tokens.
Resuming the full session will consume a substantial portion of your usage limits.
We recommend resuming from a summary.
❯ 1. Resume from summary (recommended)
2. Resume full session as-is
3. Don't ask me again
Enter to confirm · Esc to cancel
The user wants a fourth option: 'Retire / close this chat — don't resume.' Right now Esc just dismisses the modal but the tab persists, and the next visit re-shows the modal. There's no path to delete/archive the chat from the TUI.
The tab bar shows ✕ next to each tab ([3] ◉ coord:4 ✕) — that visually implies a close button, but apparently clicking/triggering it doesn't work, or there's no keybinding bound to it. User quote: 'man why can't we retire the .chat-4 ???'
Required
Pick whichever path is cleanest:
A. Keybinding to retire current tab — e.g. Ctrl+W or q while focused on a chat tab → confirms ('Retire .chat-4? [y/N]') → calls the proper retire op (probably wg abandon or wg edit --status abandoned — check existing code for chat retirement) and removes the tab.
B. Add a fourth option to the resume modal — '4. Retire this chat (don't resume)' that does the same.
C. Both. The hotkey is the more general fix; the modal option is the discoverable one.
Recommend C — modal option for discoverability, hotkey for power users.
Files likely to touch
- src/tui/ — chat tab handling, the resume-prompt modal, and key dispatch on tab focus
- Whatever wg-side command marks a chat as retired/abandoned. Check existing code for chat retirement first;
wg abandonlikely already covers it.
Validation
- Failing test first: TUI test that asserts a chat tab can be retired without resuming, given a chat task with an old/large session
- Implementation makes test pass
- cargo build + cargo test pass with no regressions
-
Manual smoke: open wg tui with a chat that triggers the resume modal; retire the chat from the modal AND via hotkey; verify (a) tab disappears from tab bar, (b) the chat task is marked retired/abandoned in
wg list, (c) the modal does not return on next TUI open
Depends on
Required by
- (none)
Log
- 2026-04-27T15:44:23.302255205+00:00 Task paused
- 2026-04-27T15:44:28.924797264+00:00 Task published
- 2026-04-27T15:44:58.188890314+00:00 Lightweight assignment: agent=Careful Programmer (f5143935), exec_mode=full, context_scope=task, reason=Careful Programmer best matches this TUI bug fix requiring test-first implementation, modal/keybinding changes, and comprehensive manual verification.
- 2026-04-27T15:44:58.702620222+00:00 Spawned by coordinator --executor claude --model opus
- 2026-04-27T15:45:08.552489203+00:00 Starting work — exploring TUI source for resume-prompt modal and tab management
- 2026-04-27T15:49:30.849883789+00:00 Found existing infra: Archive/Stop/Abandon dialog already exists. Bound to '-' on chat tab + tab close button. Issue: when chat tab is in PTY mode, all keystrokes (incl. '-' and Esc) are forwarded to the embedded CLI subprocess (claude), so the user can't reach the wg dialog. The 'resume modal' described is claude CLI's session-resume prompt, shown inside the PTY. Fix: add a Ctrl+W global escape hatch that exits PTY focus and opens the Archive/Stop/Abandon retire dialog regardless of PTY state. Also keeps existing '-' binding for non-PTY focus.
- 2026-04-27T16:02:13.170146714+00:00 Validated: cargo build OK, 21 chat_tab_navigation_tests pass (5 new). Smoke scenario tui_retire_chat_via_ctrl_w passes locally: 3 chats → Ctrl+T → Ctrl+W → 'x' → 2 chats + 1 abandoned task in graph.jsonl. Pre-existing test failure in provenance_full_lifecycle_all_ops_recorded confirmed unrelated (fails on clean main too).
- 2026-04-27T16:02:38.354292501+00:00 Committed: 72c96f6f0 — pushed to remote
- 2026-04-27T16:02:44.932039307+00:00 Task pending eval (agent reported done; awaiting `.evaluate-*` to score)
- 2026-04-27T16:05:11.370558715+00:00 PendingEval → Done (evaluator passed; downstream unblocks)