@tdd_issue @tdd_issue_1141 @tdd_issue_4177
Feature: Bug #1141 — session create persists for session list
  As a developer
  I want to verify that a session created via `agents session create`
  appears in a subsequent `agents session list`
  So that the session CRUD lifecycle works end-to-end

  Fixed: The A2A facade handler now skips creation when a session_id is
  already supplied in the params, preventing duplicate sessions (#1141).

  @tdd_issue @tdd_issue_4286 @tdd_expected_fail
  Scenario: Init then create should make list total increase from 0 to 1
    Given a CLI runner using the real session DI path
    When I tdd1141 invoke init with force yes
    Then the tdd1141 init should exit successfully
    When I tdd1141 invoke session list with format json
    Then the tdd1141 session list should exit successfully
    And the tdd1141 session list output should report total 0
    When I tdd1141 invoke session create
    Then the tdd1141 session create should exit successfully
    When I tdd1141 invoke session list with format json
    Then the tdd1141 session list should exit successfully
    And the tdd1141 session list output should report total 1
