> For AI agents: the complete documentation index is available at https://docs.phax.run/llms.txt, the full documentation bundle is available at https://docs.phax.run/llms-full.txt.

# phax 0.41.0 \{#phax-0410}

Changes since 0.40.0: [v0.40.0...v0.41.0](https://github.com/lbdremy/phax/compare/v0.40.0...v0.41.0).

## Highlights \{#highlights}

- **Vibe model and thinking level by Vibe's own flags** — phax picks a Vibe model only through what Vibe exposes per run (its flags and its own model table), and never through files in Vibe's home directory.

## Upgrading \{#upgrading}

- **phax picks the Vibe model with `--model` and `--thinking`** and needs mistral-vibe 3.1.3: run `uv tool upgrade mistral-vibe`.
- **Run `phax agent setup providers --write` once.** It lists `mistral-medium-3.5` in place of `phax-mistral-medium-3.5-off` and `-high` and drops `modelEnvVar`. phax refuses the old file until you do.
- **A `model-routing.json` keyed on the old ids is refused.** Merge the `off` edge of `phax-mistral-medium-3.5-off` and the `high` edge of `phax-mistral-medium-3.5-high` into one `mistral-medium-3.5` key. Renaming both keys gives the same key twice, and JSON keeps only the last one, so the `off` edge is lost without an error. Delete any `phax-mistral-medium-3.5-low`, `-medium` or `-max` key: `mistral-medium-3.5` offers only `off` and `high`. The refusal names each key and what to do with it.
- **`phax agent setup mistral-vibe` is gone**, and phax no longer reads `~/.vibe/config.toml`. The `# Added by PHAX.` blocks still work in your own Vibe sessions; to remove them, delete each comment line and the `[[models]]` table under it.
- **Run, phase and authoring records written before keep the old model ids.**

No step is needed in a repository.

## What's new \{#whats-new}

### Vibe model and thinking level by Vibe's own flags \{#vibe-model-and-thinking-level-by-vibes-own-flags}

> phax picks a Vibe model only through what Vibe exposes per run (its flags and its own model table), and never through files in Vibe's home directory.

- A new Vibe session phax starts runs on the model and thinking level phax chose, with no PHAX alias needed in your Vibe config. `vibe headless invocation`

  Now:

  ```text
  VIBE_OUTSIDE_WORKDIR=deny VIBE_BYPASS_TOOL_PERMISSIONS=false VIBE_TOOLS='{…}' \
    vibe -p '<prompt>' --agent accept-edits --model mistral-medium-3.5 --thinking high --output streaming --output-dir <export-dir> --workdir <worktree>

  # sealed completion
  vibe -p '<prompt>' --agent accept-edits --disabled-tools '*' --model mistral-medium-3.5 --thinking off --output streaming --workdir <cwd>

  # resumed turn: Vibe keeps the session's model and level
  VIBE_OUTSIDE_WORKDIR=deny … \
    vibe -p '<prompt>' --agent accept-edits --output streaming --output-dir <export-dir> --workdir <worktree> --resume <session-id>
  ```

  :::details Before

  ```text
  VIBE_ACTIVE_MODEL=phax-mistral-medium-3.5-high VIBE_OUTSIDE_WORKDIR=deny VIBE_BYPASS_TOOL_PERMISSIONS=false VIBE_TOOLS='{…}' \
    vibe -p '<prompt>' --agent accept-edits --output streaming --output-dir <export-dir> --workdir <worktree>

  # resumed turn
  VIBE_ACTIVE_MODEL=phax-mistral-medium-3.5-high … \
    vibe -p '<prompt>' --agent accept-edits --output streaming --output-dir <export-dir> --workdir <worktree> --resume <session-id>
  ```

  :::

- phax accepts a confined Vibe turn only when its export reports the model and the thinking level phax asked for. `export.json (Vibe's turn export)`

  Now:

  ```text
  {
    "schema_version": 1,
    "vibe_version": "3.1.3",
    "config": {
      "active_model": "mistral-medium-3.5",
      "models": [ { "alias": "mistral-medium-3.5", "thinking": "high", … } ],
      "outside_workdir": "deny",
      …
    },
    …
  }
  ```

  :::details Before

  ```text
  {
    "schema_version": 1,
    "vibe_version": "3.0.3",
    "config": { "active_model": "phax-mistral-medium-3.5-high", "outside_workdir": "deny", … },
    …
  }
  ```

  :::

- A confined Vibe turn that ran under a model or thinking level phax did not choose is refused, naming both values. `refused Vibe turn (model mismatch)`

  Now:

  ```text
  ✗ vibe ran this turn under a config phax did not set (active_model is "mistral-large-4-0", phax set "mistral-medium-3.5", read from .phax/runs/<run>/phase-02/vibe-export/export.json), so its result is refused. A Vibe agent profile or a resumed session's restored agent can override phax's settings.

  ✗ vibe ran this turn under a config phax did not set (thinking of mistral-medium-3.5 is "high", phax set "off", read from .phax/runs/<run>/phase-02/vibe-export/export.json), so its result is refused. A Vibe agent profile or a resumed session's restored agent can override phax's settings.
  ```

- The Vibe provider entry names Vibe's own `mistral-medium-3.5` model and no longer carries a model environment variable. `~/.phax/providers.json mistral-vibe entry`

  Now:

  ```text
  "mistral-vibe": {
    "enabled": true,
    "executable": "vibe",
    "defaultAgent": "auto-approve",
    "families": {
      "mistral-medium": {
        "models": [
          { "id": "mistral-medium-3.5", "efforts": ["off", "high"], "status": "active" }
        ]
      }
    }
  }
  ```

  :::details Before

  ```text
  "mistral-vibe": {
    "enabled": true,
    "executable": "vibe",
    "modelEnvVar": "VIBE_ACTIVE_MODEL",
    "defaultAgent": "auto-approve",
    "families": {
      "mistral-medium": {
        "models": [
          { "id": "phax-mistral-medium-3.5-off", "efforts": ["off"], "status": "active" },
          { "id": "phax-mistral-medium-3.5-high", "efforts": ["high"], "status": "active" }
        ]
      }
    }
  }
  ```

  :::

- An older providers.json is refused with the fields and model ids to change, and the one command that changes them. `refused providers.json (old Vibe entry)`

  Now:

  ```text
  ✗ "/Users/me/.phax/providers.json" carries fields phax no longer reads:
    - providers.mistral-vibe.modelEnvVar: phax picks the Vibe model with --model
  Run `phax agent setup providers --write` to drop them, or delete them from the file.

  ✗ "/Users/me/.phax/providers.json" lists models phax no longer routes to:
    - phax-mistral-medium-3.5-off: phax runs Vibe's mistral-medium-3.5 with --thinking off
    - phax-mistral-medium-3.5-high: phax runs Vibe's mistral-medium-3.5 with --thinking high
  Run `phax agent setup providers --write` to drop them (it also enables every installed provider), or delete them from the file.
  ```

  :::details Before

  ```text
  ✗ Invalid providers.json at "/Users/me/.phax/providers.json":
  providers.mistral-vibe.modelEnvVar: Unexpected key
  ```

  :::

- One run of the setup command turns an older providers.json into one phax reads, listing `mistral-medium-3.5` in place of the alias ids. `phax agent setup providers --write`

  Now:

  ```text
  $ phax agent setup providers --write
  Dropped models phax no longer routes to (2): phax-mistral-medium-3.5-off, phax-mistral-medium-3.5-high
  Listed in their place: mistral-medium-3.5 (off, high)
  Dropped fields phax no longer reads (1): providers.mistral-vibe.modelEnvVar
  All providers already up-to-date.
  Backup written to: /Users/me/.phax/providers.json.phax-backup-1763450000000

  $ phax agent setup providers --write --json
  { "retiredRemoved": ["phax-mistral-medium-3.5-off", "phax-mistral-medium-3.5-high"], "retiredReplaced": ["mistral-medium-3.5"], "fieldsDropped": ["providers.mistral-vibe.modelEnvVar"], … }
  ```

  :::details Before

  ```text
  $ phax agent setup providers --write
  Dropped models phax no longer routes to (1): phax-mistral-medium-3.5-max
  All providers already up-to-date.
  ```

  :::

- Your routing table keys Vibe's edges on `mistral-medium-3.5`; one still keyed on an old alias id is refused instead of silently never routing to Vibe. `~/.phax/model-routing.json equivalence`

  Now:

  ```text
  "equivalence": {
    "mistral-medium-3.5": {
      "off":  { "claude": "claude-haiku-4-5-20251001", "effort": "none", "relation": "equivalent" },
      "high": { "claude": "claude-sonnet-4-6",         "effort": "high", "relation": "equivalent" }
    }
  }

  # a file still keyed on an old id:
  ✗ "/Users/me/.phax/model-routing.json" keys equivalence edges on models phax no longer routes to:
    - phax-mistral-medium-3.5-high: use mistral-medium-3.5
  Rename the key, keeping its edges, or delete the file to use phax's built-in table.
  ```

  :::details Before

  ```text
  "equivalence": {
    "phax-mistral-medium-3.5-off":  { "off":  { "claude": "claude-haiku-4-5-20251001", "effort": "none", "relation": "equivalent" } },
    "phax-mistral-medium-3.5-high": { "high": { "claude": "claude-sonnet-4-6", "effort": "high", "relation": "equivalent" } }
  }
  ```

  :::

- phax no longer installs model aliases into your Vibe config; the command is gone. `phax agent setup mistral-vibe`

  Now:

  ```text
  $ phax agent setup mistral-vibe
  ✗ unknown command "mistral-vibe" for "phax agent setup"
  $? = 2
  ```

  :::details Before

  ```text
  $ phax agent setup mistral-vibe --install-model-aliases
  Appended 2 alias(es) to /Users/me/.vibe/config.toml:
    + phax-mistral-medium-3.5-off
    + phax-mistral-medium-3.5-high
  Backup written to: /Users/me/.vibe/config.toml.phax-backup-1763450000000
  ```

  :::

- The interactive Vibe session a stop offers runs Vibe's own `mistral-medium-3.5` model, with no PHAX alias needed. `Vibe fresh-start command at a review stop`

  Now:

  ```text
  cd '<worktree>' && VIBE_ACTIVE_MODEL='mistral-medium-3.5' 'vibe' '--workdir' '<worktree>' 'Read .phax-context/interactive-review.md, then review phase-02 with me.'
  ```

  :::details Before

  ```text
  cd '<worktree>' && VIBE_ACTIVE_MODEL='phax-mistral-medium-3.5-high' 'vibe' '--workdir' '<worktree>' 'Read .phax-context/interactive-review.md, then review phase-02 with me.'
  ```

  :::

- A stop tells you that the interactive Vibe session starts at the model's default thinking level, not the phase's. `Vibe fresh-start note`

  Now:

  ```text
  Start a fresh Vibe session:
    cd '<worktree>' && VIBE_ACTIVE_MODEL='mistral-medium-3.5' 'vibe' '--workdir' '<worktree>' '…'
    Vibe's interactive mode takes no --thinking: this session starts at mistral-medium-3.5's default thinking level, not the phase's level (off).
  ```

- phax refuses a Vibe older than 3.1.3 before any session starts, and says how to upgrade. `Vibe version refusal`

  Now:

  ```text
  ✗ mistral-vibe 3.1.2 is installed; phax needs 3.1.3 or later.
  Upgrade it: uv tool upgrade mistral-vibe
  ```

  :::details Before

  ```text
  ✗ mistral-vibe 3.0.2 is installed; phax needs 3.0.3 or later.
  Upgrade it: uv tool upgrade mistral-vibe
  ```

  :::

- The upgrade notes tell a Vibe user the three steps to take: upgrade Vibe, rewrite providers.json, and optionally delete the PHAX alias blocks. `docs/upgrading.md`

  Now:

  ```text
  ### 0.41.0

  - **phax picks the Vibe model with `--model` and `--thinking`, and needs mistral-vibe 3.1.3.** Run `uv tool upgrade mistral-vibe`.
  - **Run `phax agent setup providers --write` once.** It lists `mistral-medium-3.5` in place of `phax-mistral-medium-3.5-off` and `-high` and drops `modelEnvVar`; phax refuses the old file until you do.
  - **A `model-routing.json` keyed on the old ids is refused.** Rename each key to `mistral-medium-3.5`, keeping its edges.
  - **`phax agent setup mistral-vibe` is gone, and phax no longer reads `~/.vibe/config.toml`.** The `# Added by PHAX.` blocks still work in your own Vibe sessions. To remove them, delete each comment line and the `[[models]]` table under it.
  - Run, phase and authoring records written before keep the old model ids.
  ```

## Fixes \{#fixes}

- fix(shell): a timed-out child that ignores SIGTERM no longer outlives the CLI ([bd860d1](https://github.com/lbdremy/phax/commit/bd860d1689f86c3de47ddc61c32ed1ef01292f48))
- fix(knip): read the reporter's report and the baseline without unsafe type assertions ([68495ea](https://github.com/lbdremy/phax/commit/68495eabb0d73d3ba21bad297cc0f9c7bcf108fd))

## Other \{#other}

- feat(knip): a strict dead-code check over a committed baseline ([1696257](https://github.com/lbdremy/phax/commit/16962577131a07af8f4256ec096be6a84ad10766))
- feat(lint): type-aware lint checked against an operator's baseline ([def0e4b](https://github.com/lbdremy/phax/commit/def0e4b26d3e49893f9d3f40052889c876762545))
