A path outside the granted workspace is FsError FS_SANDBOX_DENIED
whether the guard or a confined tool refuses it, and a share that no
longer allows writing is LiveshareForkDeniedError
FORK_TOOL_NOT_PERMITTED like a lapsed fork permission. The module
contract now describes the structured denial, and the refusal table
follows the imports.
Refs #7869
After caller cancellation, a tools/execute wrapper that throws the
caller signal's reason or an AbortError without HarnessError identity
now keeps its message and carries AbortError with ABORTED, or
ABORTED_BEFORE_DISPATCH when the body never started, matching a tool
body that throws the same value. A wrapper's HarnessError and other
failures stay unchanged. Browser tools that run behind such a wrapper
now report caller cancellation as ABORTED.
Refs #7869
Every HarnessError import this branch adds now comes from the
dependency-free @deepseek-ai/dsh-error package, declared as a peer and
dev dependency with its tsconfig reference; dsh-llm peers added only for
the base class are dropped, and the dependency policy classifies the
dsh-error export once.
Refs #7869
verify-plugin-entry-exports rejects new value exports from a plugin
entry, so the stagehand, cua-driver, subagent-oar, ralph, and worktree
entries export only their error classes and code types; the closed code
lists stay in internal modules and READMEs name the codes directly.
RalphError moves to its own module.
Refs #7869
CUA and Liveshare now import HarnessError and the tool registry's error
classes at runtime; tool failures keep their identity only when these
resolve to the registry's own peer instance.
Refs #7869
Hook denials and blocks now persist HookError HOOK_DENIED / HOOK_BLOCKED
and cua refusals persist NativeError with their native codes on
tool/result; model-visible content is unchanged.
Refs #7869
A failed native callTool now throws CuaDriverError CUA_DRIVER_FAILED
with the SDK error as cause, unless the call was cancelled, and a
result that is not JSON throws CUA_DRIVER_INVALID_RESULT.
Refs #7869
Act failures, missing tabs, unclassified SDK failures, worker failures,
and drain failures now throw StagehandError with a closed STAGEHAND_*
code; StagehandDrainError becomes its subclass. Worker replies carry
name and code and the host rebuilds the same class. Arguments are
checked before dispatch and fail as ToolArgsError; a call without a live
Agent throws ToolContextUnavailableError.
Refs #7869
Foreign-Session tools, a reserved attached browser, a non-live owner, a
closing Session browser, and failed cleanup now throw
BrowserSessionError with a closed BROWSER_* code. A browser MCP call
without an Agent throws ToolContextUnavailableError, and a non-Error
abort reason becomes AbortError / ABORTED.
Refs #7869
A missing agent or jobs service throws ToolContextUnavailableError,
empty type or sessionId throws ToolArgsError, disabled background sends
throw JobError JOB_BACKGROUND_DISABLED, and a cancelled foreground send
throws AbortError / ABORTED.
Refs #7869
Provider, workflow, result, and round failures now throw RalphError
with a closed RALPH_* code; invalid objective and maxRounds throw
ToolArgsError; a missing agent throws ToolContextUnavailableError; a
workflow cancelled by the caller throws AbortError / ABORTED.
Refs #7869
Invalid names and requests, existing branches or paths, locked
registrations, failed, oversized, or timed-out commands, and a disposed
service now throw WorktreeError with a closed WORKTREE_* code. The
retained-artifact wrapper keeps the name and code of a HarnessError it
wraps and keeps caller cancellation an AbortError. create_worktree
throws ToolContextUnavailableError without a calling agent.
Refs #7869
OarFailure now extends HarnessError and maps each failure stage to a
closed code: OAR_RUNTIME_UNAVAILABLE, OAR_START_FAILED, OAR_TURN_FAILED,
OAR_ABORT_FAILED, OAR_DISPOSE_FAILED, plus OAR_INVALID_TASK for an empty
or non-text task. Startup cancelled by the caller throws AbortError /
ABORTED. subagent_oar throws ToolContextUnavailableError without a
calling agent and SubagentError UNSUPPORTED_CAPABILITY for a provider
that is not one-shot.
Refs #7869
Fork and shared-session guards now return a denial with
LiveshareForkDeniedError and a FORK_* code instead of a bare string.
Inside the confined replacements, a target outside the grant or a share
that no longer allows writing throws FsError FS_SANDBOX_DENIED,
unconfinable arguments throw ToolArgsError, and a lapsed tool
permission throws LiveshareForkDeniedError FORK_TOOL_NOT_PERMITTED.
Refs #7869
A call to a mod-registered tool that no tool.call hook answers now
throws ModUnansweredError / MOD_UNANSWERED instead of a plain Error, so
the failure is routable on tool/result. The message is unchanged.
Refs #7869
A PreToolUse deny now records HookError / HOOK_DENIED and a PostToolUse
block records HookError / HOOK_BLOCKED through the guard and
post-execute info contract. Model-facing reasons are unchanged.
Refs #7869
NativeError now extends HarnessError and keeps its name and every native
and host code, so cua refusals reach tool/result as structured identity.
A missing Agent, attachment store, or model route throws
ToolContextUnavailableError; a model without image input fails with
NativeError IMAGE_MODEL_UNSUPPORTED; request refinements fail as
ToolArgsError; native cancellation after caller cancellation records
AbortError / ABORTED.
Refs #7869
The Harness-home exemption matched every name case-insensitively, so a
home `.env` line such as `deepseek_base_url=...` passed the check and
landed in `process.env` under that spelling. The launch snapshot looks
names up exactly on POSIX, so llm-deepseek, web-search-deepseek, and
web-deepseek-api never saw it: the launch succeeded with the official
endpoint, where it used to fail. Proxy names keep matching in any letter
case because proxy clients read both spellings; the two endpoint names
now match only as `DEEPSEEK_BASE_URL` and `DEEPSEEK_SEARCH_BASE_URL`, and
another spelling fails the launch with the exact name to use.
The home-layer refusal case now covers `SSL_CERT_FILE`,
`NODE_TLS_REJECT_UNAUTHORIZED`, and `DSH_HOME`. The web-deepseek-api
README states where `DEEPSEEK_BASE_URL` may come from; the
launch-environment README, the development guide, and the configuration
source Agent Note no longer overstate which file is refused, which
Vitest configurations load the root `.env`, or what a checkout may carry.
Refs #8138
`loadLayeredEnv` refused `DEEPSEEK_BASE_URL` and
`DEEPSEEK_SEARCH_BASE_URL` from every discovered `.env`, including the
user's own `$DSH_HOME/.env`, so a machine-level endpoint written there
made both the CLI and Desktop fail at startup.
The refusal exists for the invoking directory's file: it arrives with a
clone, and a repository must not choose where requests carrying the
user's DeepSeek credential go. The home file is the user's own, and the
profile patches in the same directory can already set these endpoints as
plugin `baseURL` fields, so refusing it there protected nothing.
`HOME_LAYER_PROXY_NAMES` becomes `HOME_LAYER_ROUTE_NAMES` and adds the
two endpoint names; a project `.env` that sets either still fails the
launch, and its message now names the home file as the second way out.
`DSH_HOME` stays bootstrap-only, and the CA and TLS names stay refused
everywhere.
Tests cover the project layer refusing both names, the home layer
accepting both below an exported value, and the project-layer message.
The app-boot, launch-environment, llm-deepseek, and web-search-deepseek
READMEs, the development guide, and the two Agent Notes that stated the
old rule now state this one.
Refs #8138
The per-frame alignment after a jump pulled back scrolls it did not start,
such as a script or find in page setting the scroll position. Measured on
#7985, the browser's scroll anchoring already keeps an early, middle, or
late jump target at the top while the sections above it draw.
- Return the early answer from scanCommand without awaiting a successful
outcome: the SSH provider rejects done when termination cancels a
launch it has not yet acknowledged, which turned a retained dirty
checkout into a failed cleanup.
- Test that a never-initialized submodule is removed and that Git
refuses a committed embedded repository, which inspection leaves to
Git by design.
- Record the git-status-only trade-off and its sparse-checkout rationale
in the worktree Agent Note, and align the README, upgrade guide,
maxOutputBytes description, and comments with what is streamed.
Refs #8151
Deferred idle-time highlighting drew token text, so a file whose content
changed at the same path kept showing its previous text until the next
pass, and replacing the plain text collapsed a selection made meanwhile.
Sections highlight in their drawing render again, as before.
File sections now take the tab's visibility as a prop and the reach
tracker through their handlers, so no business component reads a React
context.
Archive cleanup read whole Git listings into the 64 KiB maxOutputBytes
buffer, so every clean checkout in a repository with more than about a
thousand tracked files settled as failed.
- Drop the skip-worktree/assume-unchanged and gitlink listings; removal
follows what `git status` reports, as peer agent products do.
- Stream `git status` and stop at its first entry, and stream the
worktree listing, so neither is bounded by maxOutputBytes; restoring a
worktree shares the streamed lookup.
- Retain a checkout whose administrative directory holds submodule
repositories instead of letting Git refuse the removal.
Refs #8151
The rows name each commit's age, so the fixed 2026-10-09 fixture began reading '1 mo ago' once the wall clock crossed 30 days and the ' d ago' assertion failed on every lane. Pin Date to the suite's 2026-10-09T12:00:00Z now and date the fixture two days earlier, matching the formatAgo cases.
Several reasoning blocks of one Assistant message rendered 16px apart inside the response body, while process rows of different steps sit 4px apart. A signature-only reasoning block renders no row but left its empty wrapper in the flex body, adding a full block gap.
Styles only: inside a step-group reasoning part, whose body holds only reasoning rows, the block gap is 4px, and an empty reasoning wrapper cancels its gap like a hidden one. A keyless web e2e pins the rendered gaps.
Both reads still run in parallel, and a failed patch read still cancels the
attributes read, but the result now waits for both: the patch's failure
passes on first, so a too-large or stale patch is never hidden by an
attributes failure that happened to end earlier.
Also documents the estimated height of undrawn files.