Skip to content

fix(nix): devShells stop shipping the agent CLI by default (1.18.1) - #1972

Merged
gerchowl merged 5 commits into
release/1.18.1from
bugfix/1967-hotfix-agent-cli
Oct 30, 2026
Merged

gerchowl merged 5 commits into
release/1.18.1from
bugfix/1967-hotfix-agent-cli

Conversation

@gerchowl

@gerchowl gerchowl commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Carry #1967 from PR #1968 onto the main-based 1.18.1 hotfix. Default project devShells leave claude to the machine; withAgentCli = true and devkit's #with-agent-cli output opt in using the same pin. Home/NixOS modules and the container image retain the CLI.

Type of Change

  • fix -- Bug fix
  • docs -- Documentation only
  • test -- Adding or updating tests

Modifiers

  • Breaking change (!)

Changes Made

Cherry-picked in source order with -x provenance retained in each commit body (before the final Refs line):

  • d246518 — shell policy regression guard.
  • 0161007 — opt-in implementation, documentation and scaffold policy.
  • 831688b — shell-builder option comments, limited to existing files.
  • d31b02d — corrected migration wording.
  • 39c17c5 — distinguish devkit-output and consumer-builder opt-ins.

Dropped from the carry:

  • Entire 260420a: Rust-only policy test bindings/assertions require templates/rust, absent from the release base.
  • assets/flake.d/rust.flake.nix comment hunk from 831688b: file absent from the release base.
  • Retained nix/mk-rust-project.nix option/pass-through and comment hunks: that file exists on the release base and the changes applied cleanly.
  • No unrelated development changelog entries carried. Both copies contain only devShells ship claude-code by default and shadow the machine's own claude wrapper #1967 in the seeded 1.18.1 section.

Changelog Entry

Under ## [1.18.1] - TBD in both changelogs, per the hotfix lane:

Changed

  • Project shells leave the agent CLI to the machine (#1967)
    • Repositories relying on the dev-shell's claude must install it machine-wide (or via the home module), or set withAgentCli = true; consumers of devkit's own devShells output can select #with-agent-cli.
    • Opting in shadows any system claude wrapper. Home modules and the container image retain the CLI.

Testing

  • Manual testing performed
  • Evaluation only: nix eval --impure --json --expr 'import ./tests/agent-cli-policy.nix {}' — exit 0 (agentCliPolicy: true). Asserts no CLI in default devShell, lib.mkProjectShell or scaffolded workspace; opt-in includes the same pinned package; home and NixOS modules retain it.
  • nix eval --raw .#checks.x86_64-linux.agentCliPolicy.drvPath — exit 0, check evaluates without building its closure.
  • Pre-change default-shell absence assertion evaluated against the test-only commit — exit 1, expected assertion failure because the CLI was present.
  • Repository commit hooks run inside nix develop; broader suites run in PR CI.

Checklist

  • Code follows project style; self-review performed
  • Documentation and regression guard included
  • Both changelogs updated in the hotfix release section
  • No unrelated release changes

Additional Notes

Targets release/1.18.1. No release workflow dispatch or merge is part of this PR.

Rebased onto release/1.18.1 at 113d379 after security-register reconciliation PR #1973. Both existing release entries (uv under Changed and the exception reconciliation under Security) are preserved alongside #1967. No implementation changes were made in this rebase.

Post-rebase verification: policy evaluation and agentCliPolicy.drvPath evaluation both exit 0. An additional evaluation asserts that the opt-in shell contains claude-code directly from the locked nixpkgs-unstable input: exit 0, version 2.1.309, unstable revision 674a2028661e550a97400c1cc992b9cca9a668a1. All 18 checks are green on rebased head 00f791f6bda5d2a73a19615f12900f1114e07823; gh pr checks 1972 --watch exited 0.

Refs: #1967

@gerchowl
gerchowl force-pushed the bugfix/1967-hotfix-agent-cli branch from f264985 to 00f791f Compare October 29, 2026 23:57
@gerchowl
gerchowl merged commit 5484a91 into release/1.18.1 Oct 30, 2026
18 checks passed
@gerchowl
gerchowl deleted the bugfix/1967-hotfix-agent-cli branch October 30, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant