# Conflicts: # packages/experimental/ptc-runtime-python/README.i18n.yaml # packages/experimental/ptc-runtime-python/README.md # packages/experimental/ptc-runtime-python/README.zh.md # packages/experimental/ptc-runtime-python/src/index.ts # packages/experimental/ptc-runtime-python/tests/runtime.spec.ts
2.6 KiB
2.6 KiB
kind, description
| kind | description |
|---|---|
| upgrade-guide | Experimental and hook plugin tool failures record error codes, NativeError, OarFailure, and StagehandDrainError become HarnessError subclasses, and browser cleanup rejects with BrowserSessionError. |
Experimental plugin failures carry error codes
English | 中文
Change
Tool failures from the CUA, browser-use, Cua Driver, worktree, Ralph, terminal, OAR subagent, Liveshare, Claude Code and Codex hook, and claude-code-mods plugins now record error: { name, code } on tool/result; previously most of these results had no error. The package READMEs list each class and code.
Code that handles these failures in-process sees these changes:
NativeErrorfrom@deepseek-ai/dsh-cuaandOarFailurefrom@deepseek-ai/dsh-experimental-subagent-oarnow extendHarnessErrorfrom@deepseek-ai/dsh-error.NativeErrorkeeps its name, codes, andCODE: messagetext.OarFailuredrops itsstageandcategoryfields; the same summary stays inmessage, andcodenames the stage. Cancellation before an OAR run starts rejects with aDOMExceptionnamedAbortErrorinstead of anOarFailure.StagehandDrainErrorfrom@deepseek-ai/dsh-experimental-browser-use-stagehand-nativenow extendsStagehandErrorand has the codeSTAGEHAND_CLEANUP_FAILED.SessionResources.dispose()from@deepseek-ai/dsh-experimental-browser-use-runtimerejects withBrowserSessionError(BROWSER_CLEANUP_FAILED) whosecauseis theAggregateErrorit previously threw;instanceof AggregateErrorno longer matches.- Liveshare guard functions return
{ reason, info }instead of a reason string. - Argument failures that now throw
ToolArgsErrorshowinvalid arguments:before the message the model sees, and a CUA screenshot request for a model without image input showsMODEL_DOES_NOT_SUPPORT_IMAGES:before its message.
Migration
- If analytics or retry rules read
tool/resulterror, add the new names and codes from the package READMEs. Earlier Session logs keep results withouterror. - Replace
instanceof AggregateErrorchecks onSessionResources.dispose()rejections withinstanceof BrowserSessionErrorand read the individual failures fromerror.cause.errors. - Replace reads of
OarFailure.stageorcategorywitherror.code. - If code catches
HarnessErrorbeforeNativeError,OarFailure, orStagehandDrainError, move the specific check first where the handling differs. - Confirm with
pnpm run typecheckand your own failure-path tests.