$npx -y skills add vercel/ai --skill update-harness-dependenciesUpdate the primary SDK dependencies of harness packages. Use when asked to update the harness SDKs or harness adapter dependencies.
| 1 | ## Update the harness packages |
| 2 | |
| 3 | The harness adapters are all the `packages/harness-*` packages. They each rely on one or more third-party packages for the respective harness's primary SDK. It is crucial to keep those dependencies up to date. |
| 4 | |
| 5 | Below you find the instructions on how to update those packages to their latest versions, while adhering to the minimum release age defined in `pnpm-workspace.yaml`. |
| 6 | |
| 7 | ### Update the harness dependency packages |
| 8 | |
| 9 | Run the following commands to update each harness's primary SDK packages. |
| 10 | |
| 11 | - For bridge harnesses (e.g. Claude Code), this will update the packages in `devDependencies`, while the actual package versions used as `dependencies` are only relevant to the harness's bridge itself. |
| 12 | - For non-bridge harnesses (e.g. Pi), this will update the packages in `dependencies`. |
| 13 | |
| 14 | Run these commands exactly as below: |
| 15 | |
| 16 | ```bash |
| 17 | # Claude Code |
| 18 | pnpm --filter harness-claude-code update @anthropic-ai/claude-agent-sdk @modelcontextprotocol/sdk --latest --lockfile-only |
| 19 | # Codex |
| 20 | pnpm --filter harness-codex update @openai/codex-sdk --latest --lockfile-only |
| 21 | # Deep Agents |
| 22 | pnpm --filter harness-deepagents update @langchain/core @langchain/langgraph deepagents langchain langsmith --latest --lockfile-only |
| 23 | # OpenCode |
| 24 | pnpm --filter harness-opencode update @opencode-ai/sdk --latest --lockfile-only |
| 25 | # Pi |
| 26 | pnpm --filter harness-pi update @earendil-works/pi-coding-agent --latest --lockfile-only |
| 27 | ``` |
| 28 | |
| 29 | For the bridge dependencies of bridge harnesses, you must additionally run the following commands. It is important to specify the `config.minimumReleaseAge` flag in accordance with what `pnpm-workspace.yaml` defines, because for these commands the `--ignore-workspace` flag is needed. |
| 30 | |
| 31 | Run these commands exactly as below: |
| 32 | |
| 33 | ```bash |
| 34 | # Claude Code |
| 35 | pnpm --dir packages/harness-claude-code/src/bridge update @anthropic-ai/claude-agent-sdk @anthropic-ai/claude-code @modelcontextprotocol/sdk --latest --ignore-workspace --config.minimumReleaseAge=4320 |
| 36 | # Codex |
| 37 | pnpm --dir packages/harness-codex/src/bridge update @openai/codex-sdk --latest --ignore-workspace --config.minimumReleaseAge=4320 |
| 38 | # Deep Agents |
| 39 | pnpm --dir packages/harness-deepagents/src/bridge update @langchain/anthropic @langchain/core @langchain/langgraph deepagents langchain langsmith --latest --ignore-workspace --config.minimumReleaseAge=4320 |
| 40 | # OpenCode |
| 41 | pnpm --dir packages/harness-opencode/src/bridge update @opencode-ai/sdk opencode-ai --latest --ignore-workspace --config.minimumReleaseAge=4320 |
| 42 | ``` |
| 43 | |
| 44 | #### Example dependencies |
| 45 | |
| 46 | Check the `package.json` files in `examples/harness-e2e-next` and `examples/harness-e2e-tui` for any of the above SDKs they depend on. Those dependencies need to be updated to match the exact version used in the packages as well. |
| 47 | |
| 48 | ### Verification |
| 49 | |
| 50 | Run the verification script to ensure all relevant dependency versions are aligned: |
| 51 | |
| 52 | ```bash |
| 53 | ./tools/verify-harness-adapter-deps.mjs |
| 54 | ``` |
| 55 | |
| 56 | If this script shows errors, you must address them, then rerun the verification script until it passes. |