Repository navigation
v3.43.0 — 2026-10-29
Added
- OCP runs natively on Windows, on the default
-ppath (#529). No request handler is modified, but two helpers change client-visible output, so the class is stated per helper instead of declaring "not endpoint-touching".sanitizeErrorchanges error text on/v1/chat/completions(JSON and SSE error bodies, and the structured-outputrefusaltext): Class B.1, OpenAI's publishedErrorobject (components.schemas.Errorin openai-openapi, spec version 2.3.0 as read 2026-10-21:messageis a required string with no stated content constraint; therefusaltext isChatCompletionResponseMessage.refusal, astring|nullwith none either), authorized by ADR 0006; no field is added, removed or retyped.SPAWN_HOME_DIRchanges/healthspawn.homeonly whenHOMEis unset, where it was the relative pathundefined/.ocp/spawn-homeand is now the real home: Class B.2, ADR 0006 (grandfathered as of v3.16.4), route (a); the field already meant "the scratch HOME path when isolated" and now says so truthfully. Tested on Windows 11 with Node 24 and the native-installerclaude.exe.- Home paths come from
os.homedir(), because native Windows shells and services usually leaveHOMEunset. - Isolated spawns also set
USERPROFILEon win32.claude.exereads its config dir fromUSERPROFILEand ignoresHOME, so without this an "isolated" spawn loaded the operator's real~/.claude. killChildTreerunstaskkill /PID <pid> /T /Fon win32, so grandchildren holding the stdout pipe are reaped (the #474 shape).SIGBREAKtriggers graceful shutdown;claudespawns passwindowsHide.- It does not
taskkilla child that has already exited (exitCodeorsignalCodeset). The #500 SIGKILL escalation is never cancelled on win32, because there is no process group to check, so at the two sites that arm it (request timeout, tool quiesce) it used to fire 5 s after the SIGTERM and runtaskkill /PID <old pid> /T /Fon a pid Windows may already have reused, force-killing an unrelated process tree. Found by an external review of566b936(finding M1) before any release carried it.killChildTreemoved fromserver.mjstolib/child-tree.mjsso the win32 branch is testable; the POSIX branch is unchanged.
- It does not
- The keychain lookup (
security) and POSIX mode tightening are skipped on win32; on Linux and macOS both are unchanged. sanitizeErroralso redacts drive-letter (C:\…,C:/…) and UNC (\\server\share\…) paths in client-visible error messages, on every platform, so the suite pins the patterns on Linux CI. POSIX paths are redacted exactly as before; what changes on Linux and macOS is that non-path text shaped like those (x:\y,c:/tmp,\\name\…) also becomes[path]. A single pair of backslashes followed by text without a third one (an escaped regex such as"\\d{3}") is not taken for a UNC path; a repeated pair such asa\\b\\cis, and the run from the first pair to the next whitespace, quote,<,>or|becomes[path](a\\b\\c tailgivesa[path] tail).CLAUDE_TUI_MODE=trueis refused at boot on win32, since TUI mode needstmuxand/bin/shhooks.setup.mjsworks on Windows: theclaudeprobes no longer redirect to/dev/null,where claudepicks the.exe, and astart_ocp.cmdlauncher replacesstart.sh. No auto-start is installed on Windows, so setup no longer waits for a health check.- Not included: Windows auto-start, and ports of the bash
ocp/ocp-connectCLIs. README § "Quickstart → Windows".
- Home paths come from
OCP_ALLOWED_ORIGIN_SCHEMES: admit browser extensions by origin scheme (#528). A Firefox extension calls OCP frommoz-extension://<id>, and that id changes per install and per profile, so declaring it inOCP_ALLOWED_HOSTSadmits one install and the403 forbidden_origincomes back after a reinstall. The new variable (comma-separated, e.g.moz-extension,chrome-extension) admits every origin of a listed scheme through the inbound origin gate (reasondeclared-schemein the gate's verdict; the log carries a reason only for a rejection, asorigin_rejected) and echoes the origin inAccess-Control-Allow-Origin; boot prints the admitted schemes.httpandhttpsare refused as entries, because they would admit every web page, and refused entries are reported at boot. Declaring a scheme admits every extension of that scheme, and with the defaultCLAUDE_ALLOWED_TOOLSany of them can run tools on the host; to admit one extension, keep declaring its id inOCP_ALLOWED_HOSTS. Unset (the default), nothing changes.
Class Hybrid, ADR 0023 (Accepted), amending ADR 0019 and ADR 0020; ADR 0006 route (b). A semantics change on the gate in front of every endpoint: with the variable set, a request from a declared-scheme origin that received403now executes. No field and no endpoint is added, and the B.2 key-set snapshot is unchanged.
Fixed
-
README now states that the CLI's environment section names the OCP host, not the client (#532).
claudewrites the spawn's working directory, platform, shell and OS into its own system prompt, and no supported flag removes it when OCP supplies the system prompt, so a model serving a client's tool turn is shown the host's directory. Measured with CLI 2.1.310:claude-haiku-4-5put the host path into awrite_filecall in 10 of 10 requests even when the client's system message stated its own directory, andclaude-sonnet-5-5followed the client. A prompt sentence attributing the section to the host was tried and dropped. In an interleaved A/B, two wordings each madeclaude-opus-4-6answer with the host directory in 8 of 8 requests wheremaindid so in 1 or 3 of 8, and neither changed haiku's 10 of 10. The fix is documentation only. The same section's "workload fit" paragraph is rewritten. It still said a client-machine coding agent cannot use a LAN OCP because "tools execute on the OCP host", which stopped being true in v3.34.0 (ADR 0022). -
AGENTS.md§ "What this project is" now says what ADR 0021 decided. ADR 0021 (2026-09-09) records that it amends that paragraph's "explicitly not an extension layer", but the paragraph was never changed, so a reader ofAGENTS.mdstill got the pre-0021 framing, with no mention that OCP serves tool calling at all. It now states both halves. OCP does not invent surface Anthropic does not expose. It is an agent backend whose clients' declared tools run on the client (ADR 0022). Documentation only. -
A request whose newest message cannot fit the model's prompt budget is refused with
400 context_length_exceededinstead of being answered without its question (ADR 0024, amending ADRs 0009/0011). Class B.1 (/v1/chat/completions), ADR 0006; the error body carries all four fields of OpenAI'sErrorobject (components.schemas.Error, openapi 2.3.0:type,message,param,code). The budget trims history newest-first, and when the newest message alone did not fit it kept nothing: measured on 566b936 with a fakeclauderecording its stdin, one 700,000-character message to a 600,000-character model reached the CLI as the 68-character note[System] Note: 1 older messages were truncated to fit context limit.and the client got a 200; with an image in the turn, the head of the message was cut off instead. Both now refuse, decided in the handler before the quota gate, the counters, the cache and the spawn (sostream: truegets a JSON 400 too), and logged asprompt_refusedwithstage: "preflight". The 400 states the budget and how many characters the newest message could have had, everything else in the request unchanged. Over-budget history is still trimmed exactly as before. Where the line sits: on the text path a single message is served up to the budget minus any continuation note the lane appends, and with history present the newest must fit inbudget − system − 202; on the image path its text, with the two-character separator in front of it, must not exceed the budget. In TUI mode system messages count against it; on-pthey travel in the system-prompt file and do not. Found by an external review of 6cf0198 (R4). -
Cache and single-flight keys no longer collide, and an assistant turn with
tool_callsand nocontentis answered instead of hanging. Found by an external review of6cf0198and reproduced here before the change (a realserver.mjsagainst a fakeclaude, each case with a control that differs in one thing). Two defects in one function,cacheHash:- No framing, and a partial view of the message.
role,content, the sampling options and the model were fed to the hasher back to back, so a user turn readingaassistantband the two turnsa/bproduced the same key; and onlyroleandcontentwere read, so two histories that differed only in a tool call's name or arguments shared one. Reach: withCLAUDE_CACHE_TTLset (it is off by default) the second caller was served the first caller's answer, streamed or not; and with the cache off, a structured request (response_format) joins an in-flight request with the same key, so two concurrent callers with different histories shared one spawn and one answer. The API key id is part of the key, so keys never shared with each other; callers with no database key (auth none or shared, the admin key, anonymous) share theanonpool. - A message with no
contentkey threw. OpenAI's assistant message makescontentoptional whentool_callsis present, andcacheHashhandedundefinedto the hasher. The throw escaped the async request callback, so the client received no bytes and the socket stayed open (unhandled_rejectionin the log;/healthunaffected). Reach: a structured request (response_format) on any configuration, and a plain request with the cache on. A plain request with the cache off was never affected, andcontent: nullor""was always answered. - Both halves exclude requests that carry a
session_id/conversation_idor acache_controlpart, and plain requests that declaretools: none of those reachescacheHash.
Class B.1, ADR 0006. Authority: OpenAI's openapi
components.schemas.ChatCompletionRequestAssistantMessage(https://raw.githubusercontent.com/openai/openai-openapi/manual_spec/openapi.yaml, spec version 2.3.0, read 2026-10-21):requiredis[role]alone, andcontentis "Required unlesstool_callsorfunction_callis specified", so the request that used to hang is valid input. The key is now the SHA-256 of one JSON document of fixed arity, taggedv3, with each message hashed whole rather than by a list of fields; JSON framing is injective over strings, finite numbers andnull(-0and an overflowing literal such as1e400serialize as0andnull, as they did under the oldJSON.stringify(m.content)), and a list of "the fields that matter" would be a second copy of whatmessagesToPromptandrenderToolTurnread. No request or response shape changes;GET /cache/statsandDELETE /cacheare unchanged.Upgrade effect. Rows written under the old key are unreachable, so the cache starts cold once; they age out through the existing TTL cleanup (every 10 minutes), and
GET /cache/statsentriescounts them until then. A client that attaches a per-request-varying extra field to its messages now partitions the cache by it, where before onlyroleandcontentcounted. Not included: answering at the HTTP boundary when any other handler throws asynchronously (it would change what every endpoint does on an internal error, which is a separate decision). - No framing, and a partial view of the message.
-
/logs, and soocp logs, read a file the installed service never writes, and answered500(#514).setup.mjspoints launchd'sStandardOutPathand systemd'sStandardOutput=append:at~/.ocp/logs/proxy.log;handleLogsread~/.openclaw/logs/proxy.log. It now reads the service's file first and falls back to the old path only when the first does not exist, so a host whose log is still there keeps working and a stale legacy file cannot shadow the live one. Any other failure on the service's file (say a permissions error) is reported as it is rather than read past, and when neither file exists the500has the same{ "error": "Cannot read log: ..." }body, now naming~/.ocp/logs/proxy.log.
Class B.2, ADR 0006 (grandfathered as of v3.16.4), route (a). Request shape (n,level), response shape (count,level,entries[]) and error shape are unchanged; the endpoint documented itself as "recent proxy log entries" and now returns them on a real install. The mismatch is not new: at v3.16.4 (git show v3.16.4:server.mjs,handleLogs) the handler already read the old path whilegit show v3.16.4:setup.mjsalready wrote the service log to~/.ocp/logs/proxy.log, so the grandfathered snapshot is the defective behaviour. ADR 0012 is not engaged: no field is added, anddocs/governance/b2-response-keys.jsonis unchanged.
It stayed hidden becausescripts/b2-key-snapshot.mjsseeded the old path in its fixture; the fixture now seeds~/.ocp/logs/proxy.log, and a mutation that puts the handler back on the old path turnsnode scripts/b2-key-snapshot.mjsred. No new env var.