Skip to content

chore(deps): phase agents run the SDK-bundled Claude Code 2.1.289 — bump @anthropic-ai/claude-agent-sdk to ≥ 0.3.296 #1440

Closed

Description

@admarble

Epic: graph-2026-10-freeze-b Tier: mechanical Execution: sequant_run

Problem

Phase agents do not run the user's installed claude CLI. They run through the Agent SDK query() in src/lib/workflow/drivers/claude-code.ts:130-158. package-lock.json pins @anthropic-ai/claude-agent-sdk 0.3.289, which bundles Claude Code 2.1.289 (its manifest.json version). package.json:99 declares ^0.3.289.

So none of the Claude Code fixes from 2.1.290 through 2.1.296 reach Sequant's own phase runs, whatever version the user has installed. The README's recommended Claude Code version (≥ 2.1.288) does not govern phase agents at all. Fresh npm installs of Sequant already resolve a newer 0.3.29x, so CI and users may run a different bundled CLI than this repo's lockfile.

Fixes in the gap that touch phase agents (from the 2026-10-13 upstream triage):

Plan-time probe (2026-10-16): Dependabot PR #1445 moves the lockfile to 0.3.296 (bundled CC 2.1.296). On its tree npm ci and npx tsc --noEmit both exit 0. #1445 merges first (the runner, with owner consent, before this issue launches; graph doc D-2). This issue then raises the package.json floor and adds the doc line.

Acceptance Criteria

  • AC-1: package-lock.json resolves @anthropic-ai/claude-agent-sdk to 0.3.296 or later, and the package.json range floor is the same version (for example ^0.3.296). Evidence: npm ls @anthropic-ai/claude-agent-sdk and node -p "require('./package.json').dependencies['@anthropic-ai/claude-agent-sdk']" output in the PR body.
  • AC-2: The full test suite passes on the bumped SDK. Evidence: the PR's green test and canary CI checks (phases don't run the full suite, graph doc I-5; a real phase run on the bump is smoke(graph-2026-10-freeze-b): a main build's phase agent has no claude.ai connectors, runs CC ≥ 2.1.296, and starts a fresh-clone worktree from the PR branch #1451's job, I-6).
  • AC-3: The docs say that phase agents run the SDK-bundled Claude Code, which can differ from the recommended interactive CLI version. Evidence: grep -n "bundled Claude Code" README.md matches next to the recommended Claude Code version line.

Prior fixes / producers

Isolated: one producer of the phase CLI version (the lockfile's SDK entry). No prior fix on this artifact.

May touch

package.json, package-lock.json (only as npm install rewrites it for the floor change), README.md, CHANGELOG.md.

Non-Goals

Activity

  1. added
    enhancement
    graph-2026-10-freeze-b
    on Oct 13, 2026
  2. admarble commented on Oct 16, 2026

    @admarble
    ContributorAuthor

    Runner context (graph-2026-10-freeze-b, tracker #1452), for the exec and qa phases:

    • exec and qa: do not run the full suite (npm test / npx vitest run with no file filter). Six phase agents run at once and the MCP phase wall is 30 minutes (graph doc I-5). Full-suite evidence comes from CI. Run only the targeted test files, in the foreground, under timeout 600, after a WIP commit. Do not use run_in_background or Monitor.
    • No edit under plugin/, .claude/skills/ or templates/skills/ (plugin freeze, I-1).
    • Gate-test ACs need the mutation record in the PR body (CLAUDE.md, Testing).
    • Dependabot chore(deps): bump the production-dependencies group across 1 directory with 3 updates #1445 merged as 14a49cd, so package-lock.json on main already resolves @anthropic-ai/claude-agent-sdk 0.3.296. Check that with npm ls @anthropic-ai/claude-agent-sdk before regenerating anything.
  3. admarble commented on Oct 16, 2026

    @admarble
    ContributorAuthor

    Complexity: Simple (3 ACs, 2 directories)

    AC Quality Check

    • AC-1: the lockfile half of the Evidence: already passes on main (npm ls @anthropic-ai/claude-agent-sdk prints 0.3.296 since chore(deps): bump the production-dependencies group across 1 directory with 3 updates #1445, 14a49cd). The package.json half fails today (^0.3.289), so the AC as a whole still gates the work. ✅
    • AC-2: evidence is CI (test + canary). Not a gate test; no mutation record needed.
    • AC-3: grep -n "bundled Claude Code" README.md returns nothing today, so it fails now and passes only after the edit. ✅

    Scope Assessment

    Non-Goals: present in the issue (no new SDK options, no @hono/node-server/zod bumps, nothing under plugin/, .claude/skills/, templates/skills/).

    Metric Value Status
    Feature count 1 ✅
    AC items 3 ✅
    Directory spread 2 (root, README/CHANGELOG) ✅

    Verdict: ✅ SCOPE_OK

    Acceptance Criteria

    AC-1: lockfile resolves SDK ≥ 0.3.296 and the package.json floor matches

    Verification: Integration Test (CLI output)
    Scenario: Given main after #1445 → When package.json is changed to ^0.3.296 and npm install --package-lock-only runs → Then npm ls shows 0.3.296+ and require('./package.json').dependencies['@anthropic-ai/claude-agent-sdk'] is ^0.3.296.
    Assumptions: lockfile already at 0.3.296 (verified now); npm install must not rewrite unrelated lockfile entries (including the libc diff noise).

    AC-2: full suite passes on the bumped SDK

    Verification: Integration Test (CI)
    Scenario: Given the PR → When CI runs → Then test and canary are green.
    Assumptions: exec/qa do not run the full suite (runner comment); #1445's probe already showed npm ci and tsc --noEmit pass on 0.3.296.

    AC-3: docs say phase agents run the SDK-bundled Claude Code

    Verification: Manual Test (grep)
    Scenario: Given README Prerequisites (line 33 recommends CC ≥ 2.1.288, line 38 explains why) → When a "bundled Claude Code" sentence is added next to it → Then grep -n "bundled Claude Code" README.md matches within a few lines of that version line.

    Implementation Plan

    Phase 1: Floor bump

    1. package.json:99: ^0.3.289 → ^0.3.296.
    2. npm install --package-lock-only; check git diff package-lock.json touches only the root packages[""] range for the SDK. Discard unrelated hunks (libc).

    Phase 2: Docs

    1. README.md, in the Prerequisites note after line 38: add one sentence. Phase agents run through the Agent SDK query() and use the Claude Code bundled with @anthropic-ai/claude-agent-sdk (2.1.296 at 0.3.296), which can differ from the interactive CLI you installed. The recommended version above applies to your interactive CLI and hooks.
    2. CHANGELOG.md under [Unreleased] → ### Changed (add the heading if absent): floor raised, with the reasons listed in the issue (chore(deps): phase agents run the SDK-bundled Claude Code 2.1.289 — bump @anthropic-ai/claude-agent-sdk to ≥ 0.3.296 #1440).

    Phase 3: Verify

    1. Run the AC-1 and AC-3 commands, then npx tsc --noEmit. Paste the AC-1 output in the PR body. Leave the full suite to CI.

    Design Review

    1. Where does this logic belong? package.json range plus the README Prerequisites note. No code change.
    2. Simplest correct approach? Raise the floor only. Rejected: pinning an exact version (loses patch updates via Dependabot); touching the lockfile by hand.
    3. Existing pattern / re-patch count? Dependabot bumps plus an explicit floor edit. git log -S'claude-agent-sdk' -- package.json shows routine bumps, no recurrent bug fix on this artifact (the issue states the same). No stop.

    Feature Quality Planning

    All standard checks pass. Notable:

    • The range floor means fresh installs can't resolve below 0.3.296, which is the point of AC-1.
    • Plugin freeze: no edit under plugin/, .claude/skills/, templates/skills/.

    Open Questions

    1. Add a README line to the "What's new" block (line ~99) too? Recommendation: no, the Prerequisites note plus the CHANGELOG entry suffice. Impact if wrong: a discoverability nit.

    Recommended Workflow

    Phases: exec → qa
    Quality Loop: disabled
    Reasoning: mechanical dependency floor plus docs; no Unit/Integration test ACs needing testgen, no UI. exec and qa must not run the full suite (runner comment).

    Label Review

    Current: enhancement, graph-2026-10-freeze-b
    Recommended: keep, add planned
    Reason: no change in scope.
    Quality Loop: won't auto-enable (SCOPE_OK).

  4. added
    planned
    on Oct 16, 2026
  5. admarble commented on Oct 16, 2026

    @admarble
    ContributorAuthor

    QA Verdict: NEEDS_VERIFICATION

    AC coverage: 2/3 met

    Gaps:

    Suggestions:

    • The hardcoded "(2.1.296 at SDK 0.3.296)" will go stale after the next Dependabot bump. Consider phrasing it as "the version in the SDK's manifest.json".

    Pending ACs:

    • AC-2

    Needs human review:

    • AC-2 CI checks still running at review time
  6. added a commit that references this issue on Oct 16, 2026
  7. added a commit that references this issue on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgraph-2026-10-freeze-bplanned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions