Plan 07: Agent CLI Session Binding

Summary

Bind every thread to exactly one user-provided codex or claude CLI session inside the embedded terminal. This plan owns YAAW’s thin launch/resume adapter boundary: launching the chosen CLI in the thread working directory, capturing the canonical session identity and display name the CLI reports, persisting that identity, and resuming the same session when the thread is reopened. It does not make YAAW an agent harness.

Plan 14 extends this boundary for Codex, Claude, OpenCode, and Copilot with CLI-confirmed rename, exact local session catalog auto-linking, and explicit recovery for older unbound threads when no unique exact match exists.

Requirements

Implementation

Tests

Manual Smoke Procedure

Until the E2E harness (Plan 10) covers this flow, document a manual smoke check in the plan PR description:

  1. Build via scripts/build.sh.
  2. Run via scripts/run.sh.
  3. Create a new thread, choose codex.
  4. Verify the thread terminal launches codex in the working directory.
  5. Verify the thread display name updates to the reported session name within a reasonable interval.
  6. Quit the app, relaunch, reopen the thread.
  7. Verify the resume command runs and the terminal shows the previous session.
  8. Repeat steps 3–7 with claude.

Acceptance Criteria