codetether-agent 4.6.2

A2A-native AI coding agent for the CodeTether ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# TUI Feature Audit

## Scope
This audit reviews the current TUI implementation under `src/tui/` and classifies features as:
- **Implemented**: actively wired and usable
- **Partial**: visible in UI or commands, but incomplete, or missing key interactions
- **Unwired / Dead-path**: code exists but is not part of the active flow

## Executive Summary
The TUI has a strong active core around chat, sessions, model selection, settings, symbol search, bus log visibility, file/image attachment, clipboard support, and monitor-style swarm/Ralph views. However, there are also several obvious gaps:

1. **Protocol view is declared but not rendered**.
2. **LSP and RLM views are informational shells, not true feature panels**.
3. **`/go` approval flow appears drafted but is not actually dispatched from slash command handling**.
4. **`/agent` is advertised but has no handler in active command dispatch**.
5. **`feature_extracted/` contains parked duplicate/incomplete implementations that are not source-of-truth**.
6. **`/autochat` is now live at MVP level, but not yet integrated with the fuller parked relay path**.

---

## 1. Core TUI Runtime

### Status: Implemented

### Evidence
- `src/tui/app/run.rs`
  - Initializes terminal, secrets, provider registry, worker bridge, session resume, workspace snapshot.
- `src/tui/app/event_loop/mod.rs`
  - Main draw/event loop is active.
- `src/tui/app/event_loop/select_loop.rs`
  - Multiplexes terminal events, session events, results, watchdog, autochat tick.

### Notes
This is a real, active runtime with session resume, background tasks, watchdog hooks, and event coalescing.

---

## 2. Chat View / Main Conversation UI

### Status: Implemented

### Evidence
- `src/tui/ui/main.rs`
  - `ViewMode::Chat => render_chat_or_webview(...)`
- `src/tui/ui/chat_view/mod.rs`
  - Chat rendering decomposed into many focused submodules.
- `src/tui/app/input/chat_submit.rs`
  - Enter in chat submits prompts or slash commands.
- `src/tui/app/message_text.rs`, `session_events.rs`
  - Active message/session synchronization.

### Notes
This is the main production path and appears to be the most complete feature in the TUI.

---

## 3. Webview Chat Layout Toggle

### Status: Implemented

### Evidence
- `src/tui/app/event_handlers/keyboard.rs`
  - `Ctrl+B` toggles classic/webview layout.
- `src/tui/ui/webview/mod.rs`
  - Active renderer for webview layout.
- `src/tui/app/commands.rs`
  - `/webview` and `/classic` switch layout mode.

### Notes
This is not a browser embed; it is an alternate ratatui layout. But it is active and wired.

---

## 4. Session Picker / Session Resume

### Status: Implemented

### Evidence
- `src/tui/app/run.rs`
  - Loads last workspace session with bounded resume window.
- `src/tui/app/session_sync.rs`
  - `refresh_sessions`, `return_to_chat`.
- `src/tui/ui/sessions.rs`
  - Session picker rendering.
- `src/tui/app/input/enter.rs`
  - Enter dispatch for `ViewMode::Sessions`.
- `src/tui/app/navigation.rs`
  - Up/down navigation and Esc behavior for sessions.

### Notes
Usable and fully part of active flow.

---

## 5. Model Picker

### Status: Implemented

### Evidence
- `src/tui/model_picker.rs`
  - Renders live model list and selection.
- `src/tui/app/commands.rs`
  - `/model`
- `src/tui/app/navigation.rs`
  - Up/down navigation for model picker.
- `src/tui/app/input/enter.rs`
  - Enter applies model.

### Notes
This is a real active feature.

---

## 6. Settings Panel

### Status: Implemented

### Evidence
- `src/tui/settings.rs`
  - Renders settings panel.
- `src/tui/app/commands.rs`
  - `/settings`
- `src/tui/app/event_handlers/mode_keys.rs`
  - `a`, `n`, `Tab` toggles settings in-panel.
- `src/tui/app/input/enter.rs`
  - Enter toggles selected setting.

### Notes
Works as a real settings surface for auto-apply, network, autocomplete, and worktree isolation.

---

## 7. File Attachment / File Picker / Image Attachment

### Status: Implemented

### Evidence
- `src/tui/app/file_picker.rs`
  - Directory scan, filter, image detection, rendering, enter behavior.
- `src/tui/app/event_handlers/keyboard.rs`
  - `Ctrl+O` opens file picker.
- `src/tui/app/input/char_input.rs`
  - File picker filter typing.
- `src/tui/app/input/backspace.rs`
  - File picker filter backspace.
- `src/tui/app/file_share.rs`
  - Attach file contents into composer.
- `src/tui/app/commands.rs`
  - `/file`, `/image`

### Notes
This is live and reasonably complete.

---

## 8. Clipboard Paste / Clipboard Image / Copy Latest Reply

### Status: Implemented

### Evidence
- `src/tui/app/event_handlers/keyboard.rs`
  - `Ctrl+V` and `Ctrl+Y`
- `src/tui/app/event_handlers/clipboard.rs`
  - text-first clipboard paste, image attach alternate path.
- `src/tui/app/event_handlers/copy_reply.rs`
  - copies latest assistant response.

### Notes
This is actively wired and useful.

---

## 9. Slash Command Autocomplete / Composer Editing / History

### Status: Implemented

### Evidence
- `src/tui/app/text.rs`
  - command normalization and alias handling.
- `src/tui/app/event_handlers/keybinds.rs`
  - Tab accepts slash suggestion.
- `src/tui/app/navigation.rs`
  - `Ctrl+Up/Down` command history in chat.
- `src/tui/app/input/chat_submit.rs`
  - slash command dispatch.

### Notes
Core editing/composer UX is active.

---

## 10. Symbol Search

### Status: Implemented, but shallow integration

### Evidence
- `src/tui/symbol_search.rs`
  - popup UI and state.
- `src/tui/app/symbols.rs`
  - calls `LspTool::workspaceSymbol`.
- `src/tui/app/event_handlers/keyboard.rs`
  - `Ctrl+T` opens symbol search.
- `src/tui/app/commands.rs`
  - `/symbols`
- `src/tui/app/input/char_input.rs`
  - typing refreshes search.

### Notes
The popup is active, but result parsing is simplistic and Enter only closes the popup after setting a status string. There is no actual jump-to-definition/navigation action yet.

Classification rationale: mostly implemented, but deeper symbol navigation is still partial.

---

## 11. Bus Log / Protocol Bus Visibility

### Status: Implemented

### Evidence
- `src/tui/bus_log.rs`
  - active bus log rendering and detailed envelope formatting.
- `src/tui/ui/main.rs`
  - `ViewMode::Bus => render_bus_view(...)`
- `src/tui/app/commands.rs`
  - `/bus`, `/protocol` currently route to `ViewMode::Bus`
- `src/tui/app/navigation.rs`
  - selection/detail/filter controls.
- `src/tui/app/input/enter.rs`
  - Enter opens detail / applies filter behavior.

### Notes
This is the real active "protocol visibility" feature today.

---

## 12. Swarm Monitor View

### Status: Implemented as monitor UI

### Evidence
- `src/tui/swarm_view.rs`
  - complete view state and rendering behavior.
- `src/tui/ui/main.rs`
  - `ViewMode::Swarm => render_swarm_view(...)`
- `src/tui/app/commands.rs`
  - `/swarm`
- `src/tui/app/navigation.rs`
  - list/detail navigation.

### Notes
This appears to be a real monitor UI. Whether every upstream producer emits rich live data is outside this audit, but the TUI side is implemented.

---

## 13. Ralph Monitor View

### Status: Implemented as monitor UI

### Evidence
- `src/tui/ralph_view.rs`
  - complete state/event model and renderer.
- `src/tui/ui/main.rs`
  - `ViewMode::Ralph => render_ralph_view(...)`
- `src/tui/app/commands.rs`
  - `/ralph`
- `src/tui/app/navigation.rs`
  - selection/detail navigation.

### Notes
As with swarm, the TUI rendering and navigation are active.

---

## 14. Latency Inspector

### Status: Implemented

### Evidence
- `src/tui/latency.rs`
  - active renderer with timing, provider metrics, and tool latency summaries.
- `src/tui/ui/main.rs`
  - `ViewMode::Latency => render_latency(...)`
- `src/tui/app/commands.rs`
  - `/latency`

### Notes
This is a real active inspector.

---

## 15. Inspector View

### Status: Implemented

### Evidence
- `src/tui/ui/inspector/mod.rs`
  - active entrypoint.
- `src/tui/ui/main.rs`
  - `ViewMode::Inspector => render_inspector_view(...)`
- `src/tui/app/commands.rs`
  - `/inspector`

### Notes
Inspector view is active. Detailed completeness of each subpanel was not exhaustively audited, but the routing/rendering is real.

---

## 16. MCP Command Surface

### Status: Implemented

### Evidence
- `src/tui/app/commands.rs`
  - `/mcp connect`, `/mcp servers`, `/mcp tools`, `/mcp call`
- Uses `app.state.mcp_registry` actively.

### Notes
This is CLI-in-TUI command functionality rather than a dedicated visual panel, but it is clearly implemented.

---

## 17. Spawned Sub-Agent Management

### Status: Partial

### Evidence
- `src/tui/app/commands.rs`
  - `/spawn`, `/kill`, `/agents` are implemented.
- `src/tui/app/state/mod.rs`
  - active spawned-agent state exists.

### Missing / Problematic
- `/agent` is advertised in multiple places but no active handler exists:
  - listed in help/status hints
  - present in slash command tables
  - normalized by aliases like `/talk`, `/say`, `/focus`
  - **no actual `/agent` command handler in `handle_slash_command`**

### Impact
Users are told they can focus/message a spawned sub-agent, but the active slash dispatcher does not implement it.

---

## 18. `/autochat`

### Status: Partial (improved from earlier fake behavior)

### Evidence
- `src/tui/app/commands.rs`
  - `/autochat` is dispatched.
- `src/tui/app/autochat/handler.rs`
  - active event handling.
- `src/tui/app/event_loop/autochat.rs`
  - active background drain.
- `src/tui/app/autochat/worker.rs`
  - now executes a real provider-backed background task.

### Remaining Gap
- The fuller relay/OKR-aware logic still appears parked in `src/tui/feature_extracted/autochat_relay.rs`.
- Current live implementation is functional but not yet the full intended multi-agent relay path.

### Impact
No longer a fake completion path, but still not feature-complete relative to the parked design.

---

## 19. `/go` OKR approval flow

### Status: Partial / likely unwired

### Evidence
- `src/tui/app/commands.rs`
  - contains `handle_go_command(...)`
- `src/tui/app/okr_gate.rs`
  - substantial OKR drafting logic exists.
- `src/tui/app/event_handlers/okr.rs`
  - approval/deny handlers exist.

### Missing / Problematic
- In active slash dispatch (`handle_slash_command`), there is **no visible path calling `handle_go_command`** in the audited regions.
- `chat_submit.rs` sends slash commands only through `handle_slash_command`.
- Help and hints mention `/go`, but active dispatch evidence is incomplete.

### Impact
This looks like a drafted feature with major parts implemented, but active end-to-end wiring is suspect.

---

## 20. Protocol View (`ViewMode::Protocol`)

### Status: Declared but blank in active UI

### Evidence
- `src/tui/models/view_mode_registry.rs`
  - includes `ViewMode::Protocol`
- `src/tui/models/view_mode_display.rs`
  - display name + shortcut hint (`Ctrl+P`)
- `src/tui/ui/main.rs`
  - `ViewMode::Protocol => {}`
- `src/tui/app/input/enter.rs`
  - Enter in Protocol mode does nothing.
- `src/tui/protocol_registry.rs`
  - a renderer exists, but is not wired into top-level dispatcher.

### Impact
This is the clearest example of a user-visible but incomplete feature.

---

## 21. LSP View

### Status: Partial / informational shell

### Evidence
- `src/tui/lsp.rs`
  - text explicitly says:
    - "Planned next step: connect symbol search and diagnostics navigation."
    - "For now, use this view as a dedicated workspace/introspection panel."
- `src/tui/ui/main.rs`
  - renderer is wired.
- `src/tui/app/commands.rs`
  - `/lsp`

### Impact
The view exists, but it is not a full LSP workspace workflow panel yet.

---

## 22. RLM View

### Status: Partial / informational shell

### Evidence
- `src/tui/rlm.rs`
  - text says it is the "future home" for large-codebase analysis.
- `src/tui/ui/main.rs`
  - renderer is wired.
- `src/tui/app/commands.rs`
  - `/rlm`

### Impact
This is an informational shell, not a complete feature panel.

---

## 23. Help Overlay

### Status: Implemented, but contains stale claims

### Evidence
- `src/tui/help.rs`
  - real help overlay rendering.

### Problems found
Help currently advertises or implies some capabilities that do not cleanly match the active code:
- `/protocol` behaves as a bus-log alias, not a dedicated protocol registry view.
- `/agent` is documented but not actively handled.
- `Ctrl+P` is listed as Protocol shortcut in display metadata, but active keybinding implementation for Protocol view was not found in the audited handlers.

### Impact
The help system is real but partially inaccurate.

---

## 24. Parked `feature_extracted/` modules

### Status: Unwired / dead-path / ambiguous source of truth

### Evidence
- `src/tui/feature_extracted/mod.rs`
  - documents modules as partially integrated and pending stabilization.
- `src/tui/feature_extracted/watchdog_and_pickers.rs`
  - explicitly says it is not wired into the compilation graph.
- `src/tui/feature_extracted/webview.rs`
  - contains duplicate protocol rendering logic.
- `src/tui/feature_extracted/autochat_relay.rs`
  - contains much more substantial relay logic than the active `app/autochat/worker.rs` path.

### Impact
This directory creates uncertainty about what code is canonical and what is abandoned/refactor staging.

---

## 25. Command Inventory Status

### Clearly implemented slash commands
- `/help`
- `/sessions`
- `/import-codex`
- `/swarm`
- `/ralph`
- `/bus`
- `/protocol` (alias to bus, not dedicated protocol view)
- `/model`
- `/settings`
- `/lsp`
- `/rlm`
- `/latency`
- `/inspector`
- `/chat`
- `/webview`
- `/classic`
- `/symbols`
- `/new`
- `/undo`
- `/file`
- `/image`
- `/autoapply`
- `/network`
- `/autocomplete`
- `/steer`
- `/mcp ...`
- `/spawn`
- `/kill`
- `/agents`
- `/autochat`

### Drafted / suspicious / not confirmed end-to-end
- `/go`
- `/team`
- `/agent`

---

## Highest-Priority Gaps

### P0
1. **Wire Protocol view renderer**
   - `ViewMode::Protocol` currently renders nothing.
2. **Implement `/agent` or stop advertising it**
   - Current help/aliases imply support that active dispatch does not provide.
3. **Resolve `/go` wiring**
   - Confirm and fix active slash dispatch to the OKR approval flow.

### P1
4. **Upgrade `/autochat` from MVP provider request to full relay flow**
   - Reconcile with parked `feature_extracted/autochat_relay.rs` logic.
5. **Turn LSP view from informational shell into an actual interactive panel**
6. **Turn RLM view from informational shell into an actual interactive panel**

### P2
7. **Audit and shrink/remove `feature_extracted/` dead paths**
8. **Correct help/shortcut documentation to match actual behavior**

---

## Recommended Issue Mapping
- **#57** `/autochat` real relay wiring
- **#58** Protocol view rendering and navigation
- **#59** resolve parked `feature_extracted` dead/duplicate paths
- New follow-up issue recommended: **Implement `/agent` active handler or remove it from UX**
- New follow-up issue recommended: **Wire `/go` end-to-end from slash command to OKR approval execution**
- New follow-up issue recommended: **Replace LSP/RLM informational shells with real interactive functionality**

---

## Bottom Line
The TUI is **not mostly unfinished**. Its **core workflow is real and substantial**. But several user-facing features are either:
- placeholders (`LSP`, `RLM`),
- declared but blank (`Protocol`),
- partially integrated (`/autochat`), or
- advertised without active handler evidence (`/agent`, likely `/go`).

So the correct characterization is:

> **The TUI core is implemented, but there are several unfinished or misleading edge features that should be cleaned up next.**