fix-tui-supervisor-coexistence

Implement: TUI/supervisor coexistence — apply chosen approach (per research-tui-supervisor-coexistence)

Metadata

Statusdone
Assignedagent-1800
Agent identity3184716484e6f0ea08bb13539daf07686ee79d440505f1fdf2de0357707034c3
Modelcodex:gpt-5.5
Created2026-05-02T23:54:00.607718294+00:00
Started2026-05-03T01:04:58.925894755+00:00
Completed2026-05-03T01:22:36.419747852+00:00
Tagsfix,nex,chat,tui,supervisor,bug, eval-scheduled
Eval score0.74
└ blocking impact0.70
└ completeness0.70
└ constraint fidelity0.55
└ coordination overhead0.75
└ correctness0.75
└ downstream usability0.70
└ efficiency0.80
└ intent fidelity0.69
└ style adherence0.80

Description

Description

Apply the chosen approach (single-owner sentinel OR cooperative-handoff observer-mode) from research-tui-supervisor-coexistence. Goal: when the user is connected via TUI, the supervisor stops trying to respawn its own nex handler.

Implement directly — do not decompose further.

File scope (limit to these files)

  • src/tui/viz_viewer/state.rs (around 13696-13753, takeover dance) — if the chosen approach writes a sentinel/flag here
  • src/commands/service/coordinator_agent.rs (pre-flight check at the top of the supervisor loop) — to consult the sentinel/flag
  • src/session_lock.rs (only if the protocol extends here)
  • tests/

DO NOT touch: event.rs (no input changes), nex.rs handler logic, agency code.

Validation

  • Failing test written first that exercises the coexistence boundary
  • Implementation makes the test pass
  • cargo build + cargo test pass with no regressions
  • Live verification: open TUI, switch to chat tab; assert supervisor stops respawning while TUI is connected; close TUI; assert supervisor resumes

Depends on

Required by

Log