Skip to content

fix(criteria): search the whole command in command_executed and bump harness SDKs for Opus 5.5 - #196

Open
bai-uipath wants to merge 7 commits into
mainfrom
bai/command-executed-full-command
Open

bai-uipath wants to merge 7 commits into
mainfrom
bai/command-executed-full-command

Conversation

@bai-uipath

@bai-uipath bai-uipath commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Unblocks moving the claude-code nightly to Opus 5.5 (UiPath/skills#3514). Three changes:

1. command_executed searches the whole command

Before, the criterion only searched the first 2,000 characters of each command. Opus 5.5 often batches a task into one long Bash call and runs the checked command at the very end:

cat > agent.json <<'EOF'
{ ... 2,400 characters of agent definition ... }
EOF
uip agent refresh && uip agent validate
Criterion on the command above Before After
command_executed: uip agent validate not found, task fails found, task passes
max_count: 0 on a retired command at the end of a long script (same for exclude_pattern) not seen, check passes seen, check fails

The per-search length bound against ReDoS stays; the rest of the command is searched in bounded windows aligned to shell lines.

Re-grading published runs:

Run Fail → pass Pass → fail
Opus 5.5 full suite (2026-09-23) 35 0
Sonnet 5 nightly (2026-09-23) 0 0

2. Harness SDKs and CLIs move to current releases

Package Was (age on 2026-09-23) Now Why this version
Claude Code CLI (agent image) 2.1.177 (102 days) 2.1.281 the CLI claude-agent-sdk 0.2.159 bundles
claude-agent-sdk 0.2.124 (65 days) 0.2.159 latest
openai-codex 0.144.4 (68 days) 0.156.1 latest
openai-codex-cli-bin 0.144.4 (70 days) 0.156.1 latest
google-antigravity 0.1.8 (62 days) 0.1.18 latest
Pi CLI 0.84.4 (26 days) 0.87.1 latest
anthropic 1.0.0 (34 days) 1.8.0 latest
harbor 0.22.0 (32 days) 0.23.0 latest
litellm 1.98.0 (32 days) 1.102.0 newest past the 48h gate; 1.102.1 clears 2026-09-25
uipath 2.10.31 (182 days) 2.14.24 newest past the 48h gate; 2.14.25 clears 2026-09-25
openai 2.54.0 2.54.0 unchanged: litellm requires <3

What this fixes in practice:

  • Cost. Claude Code computes the claude-code cost itself. The old CLI billed Sonnet 5 at Sonnet 4 rates ($3/$15) and Opus 5.5 at Opus 5 rates ($5/$25), so costs read about 1.5x high for Sonnet 5 and 1.65x high for Opus 5.5. 2.1.281 bills both at list: Opus 5.5 $4/$20, Sonnet 5 $2/$10.
  • Reported CLI version. The SDK runs the CLI it bundles, not the image's. Before, Docker runs reported 2.1.177 while 2.1.216 actually ran. The image pin now equals the bundled version, so the reported version is the one that ran.

Pricing check on this branch, hello_date on Opus 5.5 over Bedrock (passes, score 1.0):

Tokens Count Opus 5.5 list, per MTok Cost
Uncached input 6 $4.00 $0.0000240
Output 373 $20.00 $0.0074600
Cache write 22,262 $5.00 $0.1113100
Cache read 43,997 $0.20 $0.0087994
Total $0.1275934, the exact cost Claude Code reported

3. claude-agent-sdk is exempt from CI's 48-hour package-age gate

  • Why: new-model support ships in the Claude Code CLI bundled inside this SDK, faster than the gate allows. Example: Opus 5.5 pricing first shipped in Claude Code 2.1.280 on 2026-09-22. With the gate, CI could only install claude-agent-sdk 0.2.157, which bundles 2.1.277 and bills Opus 5.5 at a $5/$25 fallback (about 1.6x list).
  • Precedent: openai-codex and its CLI binary are already exempt for the same reason. The trade-off is the same too: a new SDK release reaches CI without the 48-hour wait.
  • Scope: PR checks, Harbor E2E, release and TestPyPI publish. The gate only runs on the CI host, not inside docker build, so image-only installs (Antigravity, Pi, the Claude Code npm package) were never gated.
  • Downstream: the pyproject floors stay at claude-agent-sdk>=0.2.157 and openai-codex>=0.155.1. skills and coder_eval_uipath CI don't exempt these packages, so a higher floor would break their installs of this release until the new versions age in. The lockfile and the agent image still get the versions above.

🤖 Generated with Claude Code

… the first 2000 chars

The ReDoS bound truncated every command to its first 2000 characters, so a checked command at the end of a long heredoc script was scored as never run. Search the rest of the command in bounded, line-aligned windows instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bai-uipath and others added 5 commits September 23, 2026 16:43
- claude-agent-sdk 0.2.124 -> 0.2.159 (bundles Claude Code 2.1.281) and the image's Claude Code 2.1.177 -> 2.1.281, so the CLI the SDK runs and the one reported in environment_info agree. 2.1.281 knows Opus 5.5 and the current Sonnet 5 price, so claude-code turn costs match list pricing again.
- openai-codex / openai-codex-cli-bin 0.144.4 -> 0.156.1
- google-antigravity 0.1.8 -> 0.1.18: workspace containment moved into localharness, so policy.workspace_only() no longer carries a path predicate; the test now checks the resolved workspaces cover the skill roots.
- Pi 0.84.4 -> 0.87.1, anthropic 1.0.0 -> 1.8.0, litellm 1.98.0 -> 1.102.1, harbor 0.22.0 -> 0.23.0, uipath 2.10.31 -> 2.14.25
- Ignore pydantic's ReadOnly TypedDict warning from litellm>=1.102 types, and regenerate the codex golden for the two null fields the new SDK serializes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
harbor 0.23.0 annotates BaseAgent.SUPPORTS_ATIF as ClassVar[bool], so the plain bool override fails pyright's reportIncompatibleVariableOverride.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gate

CI's safe-chain rejects any package published less than 48 hours ago, so every Linux job failed at install. Relocked with every package cut off at 2026-09-21T23:00Z: claude-agent-sdk 0.2.157 (bundles Claude Code 2.1.277), anthropic 1.7.0, openai-codex and cli-bin 0.155.1, google-antigravity 0.1.17, litellm 1.102.0, uipath 2.14.23; Claude Code image ARG 2.1.277 and Pi 0.87.0.

Claude Code 2.1.277 prices Sonnet 5 at list but has no Opus 5.5 entry, so Opus 5.5 runs still cost at its $5/$25 fallback until the next bump to 2.1.280 or later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d take the latest SDK

CI's safe-chain holds back any package younger than 48h. claude-agent-sdk bundles the Claude Code CLI, and new-model support (Opus 5.5 pricing landed in 2.1.280) ships there faster than that window, so it joins openai-codex in the exclusion list. The repo secret SAFE_CHAIN_MINIMUM_PACKAGE_AGE_EXCLUSIONS is set and replaces the literal fallback, so the entry is appended outside the `||` in pr-checks, release and publish-testpypi. The image ARG lists get it too.

Lock: claude-agent-sdk 0.2.159 (bundles Claude Code 2.1.281, ships a win_amd64 wheel, which fixes the Windows smoke), openai-codex and cli-bin 0.156.1 (already exempt), google-antigravity 0.1.18 (image-only install, not gated), anthropic 1.8.0, uipath 2.14.24. litellm stays at 1.102.0 and harbor at 0.23.0, the newest that clear the gate. Image ARGs: Claude Code 2.1.281, Pi 0.87.1.

The pyproject floors for claude-agent-sdk and openai-codex stay at 0.2.157 and 0.155.1: skills and coder_eval_uipath CI do not exempt these packages, so a higher floor would break their installs of the next release until the new versions age in.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@bai-uipath bai-uipath changed the title fix(criteria): search the whole command in command_executed, not just the first 2000 chars fix(criteria): search the whole command in command_executed and bump harness SDKs for Opus 5.5 Sep 24, 2026
…or E2E

Harbor E2E installs the locked deps on the same safe-chain pool but carried no exclusion list, so it blocked claude-agent-sdk 0.2.159. It now uses the same workflow-level expression as pr-checks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@bai-uipath
bai-uipath marked this pull request as ready for review September 24, 2026 21:16
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Claude finished @bai-uipath's task in 1m 25s —— View job


Code Review for PR #196: Fix command_executed criterion and update harness SDKs

Working on review...

Review Checklist:

  • Read .github/code_review.md for review standards
  • Read CLAUDE.md for project conventions
  • Review the full PR diff
  • Review each changed file in detail
  • Check cross-file consistency
  • Perform "what's missing" analysis
  • Format and post final review

This branch has not been deployed

No deployments
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