@tdd_issue @tdd_issue_554 @tdd_issue_4178
Feature: TDD Issue #554 — session list DI container missing db provider
  As a developer
  I want to verify that `agents session list` fails due to the
  DI container missing a `db` provider
  So that the bug is captured and will be caught by a regression test

  The root cause is that `_get_session_service()` in session.py calls
  `container.db()`, but the Container class has no `db` provider, causing
  an AttributeError at runtime.

  Scenario: Session list command succeeds via DI container
    Given a CLI runner using the real session DI path
    When I invoke the session list command
    Then the session list command should exit successfully

  Scenario: Session list DI path resolves a SessionService
    Given a CLI runner using the real session DI path
    When I request the session service from the DI container
    Then the session service should be a valid SessionService instance

  Scenario: Session list command produces structured output via DI
    Given a CLI runner using the real session DI path
    When I invoke the session list command with format json
    Then the session list command should exit successfully
    And the session list output should be valid JSON
