Skip to content

Merge stable OpenCodex v2.100.8 - #19

Merged
bcdonadio merged 58 commits into
customfrom
update/upstream-2.100.8
Nov 24, 2026
Merged

bcdonadio merged 58 commits into
customfrom
update/upstream-2.100.8

Conversation

@bcdonadio

@bcdonadio bcdonadio commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Merge the official stable v2.100.8 tag with both parents intact and synchronize the four package and desktop version sources.
  • Apply upstream's confirmed native roster capabilities alongside the fork's authenticated Ultrafast, specialty metadata, and account-specific picker behavior. Keep physical-send attribution in Compact and the dashboard while incorporating upstream credential-recovery receipts and partial-cost rendering.
  • Fix StepCode queue admission so an active turn releases its slot immediately, while the remaining turns keep their arrival order. Settle an active turn when its StepCode process exits, and preserve held tools across rejected results. Return an explicit expiration error when an owned continuation has lost its process and carries history the transport cannot replay. Reject mixed held results and new instructions before consuming the hold, and wait for query release after terminal events.
  • Keep both parents' release-evidence history and pin the merged workflow and skill generator. Retain the fork's test-layout sharding and register the new upstream cases.

Start review with the native roster projections, Compact dispatch receipt, and release-evidence policy. The security review covered credential ownership and destination boundaries, Child read admission, and CI permissions and signer bindings. The upstream StepCode owner decision covers the unchanged upstream provider admission.

Verification

  • Verified pinned Bun 1.4.4 against the repository SHA-256 and installed frozen root, GUI, and docs lockfiles.
  • Passed 318 runtime regressions, 110 catalog regressions, 127 isolated GUI tests, 88 layout and adapter tests, 38 version-source tests, 26 release-evidence tests, 56 targeted provider and relay checks, 68 StepCode session, queue, and ownership tests, 27 process cleanup tests, 72 focused tests after the continuation changes, 55 after the mixed-input fix, and 87 after terminal cleanup changes.
  • Passed the structure and release-policy gates, verified both merge parents and the signature, and built all 820 docs pages with internal link checking.
  • Preflight confirmed the ready connected client, ChatGPT authentication, 35 picker models, and GPT-6.2 Sol inference through the existing Responses WebSocket relay.
  • The update workflow leaves the broad local suite, standalone typecheck, lint, privacy scan, and GUI diagnostics out of the local validation run. The fork's Cross-platform CI workflow is disabled, and the DCO advisory flags unsigned-off commits inherited from upstream. Numbered release build and signature verification run after merge.

The upstream Models Overall change includes this fixture capture.

Models Overall tab with fixture data

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

lidge-jun and others added 30 commits November 20, 2026 06:13
…n#8967)

Follow-up to lidge-jun#8965: the cap-reached case only exercised the cutoff before each owner read. The new cap-during-owner case moves the cutoff into the past during the first owner read and requires no refresh read.
* feat(step-cli): run StepCode as a Step Plan transport

Adds a `step-cli` preset that spends a Step Plan subscription through StepCode's own
harness instead of calling api.stepfun.com/step_plan directly.

The StepCode CLI exposes `step --sdk-stdio`, a length-prefixed framed protocol with
`sdk-tools` and `permission-callback` capabilities. That surface fits this repository's
tool-ownership contract better than the capture-only MCP server the sibling CLI routes
stage: the client's catalog is declared as inline-schema SDK tools, a call returns as a
`sdk_tool.invoke` reverse request, and no MCP server is written and no tool ever executes
inside StepCode.

Three contract decisions differ from the other CLI families and are documented in
structure/providers/step-cli-transport.md:

- Its own wire, which is not `--mode rpc`'s newline-delimited JSONL. A peer that mixes the
  two is answered with silence, so the envelope guard and the decoder are strict.
- One process per conversation. `query.input` reduces every message to text and images, so
  an assistant turn, a declared tool call and its result cannot be replayed through the
  wire. Sessions are keyed by the handle the client echoes back through `providerState`,
  and a process that dies is reported rather than restarted, because tool results already
  delivered are not replayable here.
- A bounded tool-result window. StepCode's `SDK_TOOL_TIMEOUT_MS` is 120s and a late answer
  produces a `permission_denied` message inside the model's context, so the hold timer is
  shorter and reports `step_cli_tool_result_too_late`.

No credential is injected: the CLI resolves its own `step login`, so the child environment
adds only `USER` and a redirected session directory. Handshake rejects a runtime that does
not advertise `sdk-tools`, because such a runtime answers text only while looking healthy.

Verified against a signed-in Step Plan account and a real `step` process: initialize,
query.start with inline tool schemas, permission.request, sdk_tool.invoke, and a final
assistant message that used the tool result.

* fix(step-cli): keep conversations alive across requests and deliver tool results

The first live run against a real `step` process surfaced four defects that no unit
test could have found, each fixed here with the evidence that located it:

- `runTurn` returned right after `query.input` was acknowledged, so the response
  reached the client with no terminal event (`incomplete_details.reason =
  adapter_eof`). It now awaits the turn's own completion, raced against the
  client's abort.
- The framed protocol nests the projected message as `{queryId, message: {...}}`,
  unlike `step --mode json` which prints `type` at the top level. Reading
  `payload.type` made every turn look idle until it timed out.
- `sdk_tool.invoke` carries the descriptor's BARE `toolName` alongside
  `serverName`, not the registered `<serverName>__<toolName>` name. The miss fell
  into a denial, and a denial carrying only `{message}` is not a denial to
  StepCode: it renders an EMPTY tool result, which the model reports as a command
  that ran and produced nothing. `refuseToolCall` now answers with an error frame.
- Nothing owned state across a request boundary. `createStepCliAdapter` runs once
  per request, so the session pool and the active turn lived in a closure that was
  already gone when the next request arrived: every continuation started a fresh
  process and orphaned the tool call it was supposed to release. Both moved to
  module scope, following `devin/trajectory.ts`, and the conversation is keyed by
  the thread identity Codex sends on every request rather than by persisted
  provider state, which is what `devin`, `zed`, `cursor` and `google` all do.

A turn that answers a captured call now delivers the result and does not re-prompt:
the model already has the instruction and is mid-query.

Verified end to end against a signed-in Step Plan account and the installed CLI:
turn 1 returns `function_call shell {"cmd":"echo LIVE_BRIDGE_OK"}`, the client runs
it, and turn 2 returns the command's real output.

* fix(step-cli): keep registry bookkeeping files within their budgets

Three bookkeeping files were rewritten with a JSON pretty-printer instead of surgical
edits, so registering five test files reformatted the whole document:

  scripts/test-layout/layout.json              1965 -> 2317 lines
  tests/fixtures/test-layout-expected.json    1349 -> 2442 lines
  structure/manifest.json                      979 -> 1029 lines

The first two crossed the ratchet's 2000-line ceiling for an unlisted file, which is
why `file-size ratchet: repository` failed on this branch and passed at the baseline.
Restored each from 2a3fd00 and re-applied the additions as anchored insertions, so the
only delta is the five registrations (1970 / 1352 / 988 lines).

The preset totals in the docs were the other honest gate: the registry gained one
preset, so all eight locales' guides and quickstarts and the structure ops record now
state 106 presets and 86 key-based.

* fix(step-cli): address every CodeRabbit finding on lidge-jun#7267

Ten findings, all verified against the code rather than dismissed. Three were Major and two of
those were cross-client data leaks that the existing suite could not see — which is the point:
a green suite said the old `default` conversation handle was fine, because nothing tested what
happens when two clients have no identity at all.

Security / data integrity:

- `conversationHandle` returned the shared string `"default"` when a request carried no thread,
  session or previous-response identity. Claude Code, Grok Build and generic Chat clients all send
  such requests, so unrelated clients shared one StepCode process: one could read another's
  context, and a held tool result from one could be delivered into another's query. It now returns
  undefined and the caller mints a private ref, so an identity-less request gets its own process.
  Verified live against two identity-less requests carrying different tokens: neither saw the other.
- A held tool result was matched by POSITION in the transcript instead of by call id, so a client
  that followed a tool call with a user message instead of a result had an older result delivered as
  the answer to the current call. The pool now remembers the call id beside the frame id, delivery
  requires `toolCallId` to match, and a mismatch refuses the call.
- A client abort left the query running inside StepCode. Since it serves one query at a time, the
  next request for that conversation would be rejected or blocked. The abort path now interrupts the
  query and closes the session when the interrupt cannot be confirmed.

Stability:

- Concurrent `open()` calls for one conversation each spawned a process; the second
  `#entries.set` orphaned the first with an unreleasable held tool call. Opens are now coalesced on
  an in-flight promise keyed by handle.
- When a held call expired, no turn received the expiry and no answer reached the runtime, so
  StepCode waited out its own 120s window and a later turn could re-emit a duplicate tool call. The
  expiry is now answered with a refusal and never re-dispatched.
- stderr was decoded per chunk with `toString("utf8")`, so a CJK character split across chunks
  became U+FFFD and the not-signed-in detection that matches 未登录 could stop firing. The stream
  is now `setEncoding("utf8")`.
- A spawn `error` (e.g. ENOENT) closed the session without stopping the idle sweep.

Diagnostics / maintenance:

- An undersized length prefix reported "exceeds max frame size" with FRAME_TOO_LARGE, pointing at
  the ceiling when the real fault is a truncated stream. It now has FRAME_TOO_SMALL and its own text.
- `STEP_CLI_TOOL_SERVER` was defined twice; the bridge now re-exports the single definition.
- The expiry test slept 560ms of wall clock and went flaky on slow runners. It now injects timers.

Every finding has a regression test (tests/adapters/step-cli-conversation.test.ts plus additions to
step-cli-session.test.ts and step-cli-tool-result.test.ts): 60 step-cli tests, and the full focused
set of 130 across layout, ratchet, preset counts, conformance and registry parity.

Live re-verified after the fixes: turn 1 returns the client's `function_call`, turn 2 returns the
command's real output.

* fix(step-cli): release the runtime's query slot, serialise concurrent turns

Two more defects, both found by driving the real CLI rather than the suite. Neither was
reachable from the previous round's tests, which is the point: the suite exercised tool
continuations and identity-less requests, and both defects lived one layer below that.

A multi-turn conversation could not exist. StepCode's `#maybeFinish` refuses to finish a
query whose input has not ended, and this adapter never sent `query.input_end` — so the
runtime's single query slot was never released and the second turn on a conversation failed
with SESSION_BUSY. The missing call also explains why the tool path worked: a captured call
keeps its query open on purpose, and every earlier live test went through that path. Only a
plain text conversation reaches the broken branch. `query.input_end` is now sent when a turn
settles with a completion, and deliberately NOT when a tool call is captured, because that
query is still owed the client's result.

Concurrent turns on one conversation corrupted each other. This proxy's turn state is keyed
by the single process StepCode serves one query from, so two overlapping turns overwrote each
other's runtime, interrupted each other's query and closed each other's session. Measured
before the fix: two concurrent requests on one `thread-id` both failed, one with
SESSION_NOT_FOUND and the other with step_cli_session_closed. Turns are now queued per
conversation, with a small cap so a pile-up is refused rather than grown.

The queue made a second, subtler failure visible — a turn that waits for a terminal event with
neither a client abort nor a CLI event would hold that queue for the life of the process, so
waiting now has a hard deadline far above StepCode's own 120s tool window.

A third fix falls out of the measurement: a turn settles when the CLI reports `turn_complete`,
which can precede the runtime freeing its slot, so `query.start` retries while the runtime
reports itself busy. The retry is message-based rather than `instanceof StepSessionError`, so a
change of error class cannot silently turn a handover race back into a hard failure.

Verified against the real CLI after the fixes: three consecutive text turns on one thread all
complete with the right answers (TURN1/2/3_DONE), and two concurrent requests on one thread
both complete with distinct answers and no cross-talk. step-cli is now 80 tests; the broader
focused set (layout, ratchet, preset counts, conformance, registry parity) is 130.

* fix(step-cli): make the tool-catalog ceiling legible, verified against real Codex

A stock Codex 0.162.0 client was pointed at this route for the first time, and it failed
immediately: "Invalid StepCode tool catalog: tool catalog exceeds tool count limit".

Measured rather than guessed: Codex declared 1749 tools / 2.5 MB, because it flattens every
MCP server's tools into the function catalog. The shared CLI-family ceiling is 128 tools /
2 MiB — the same bound `qoder`, `codebuddy` and `claude-cli` enforce from the same
`buildCodingAgentToolCatalog` — so this is a family constraint, not a step-cli defect, and
raising it is a maintainer decision rather than something to slip into this PR.

What this changes is the refusal. "exceeds tool count limit" cannot distinguish an oversized
catalog from a malformed one, so an operator reading it had no way to know 1749 tools were
involved or that the bound is family-wide. It now names the declared count, the ceiling, and
the operator action (disable or narrow MCP servers for this provider). Failing closed is
deliberate: a tool the client believes exists but that never reaches the model is worse than a
refusal.

Same client, with MCP servers stripped, drives the route end to end:

  text turn -> codex replies CLEAN_CODEX_OK
  tool turn -> codex runs /bin/zsh -lc 'echo CLEAN_TOOL_OK' (succeeded in 0ms)
               and reports the output verbatim

So the tool really is executed by the client, which is the whole point of the route.

The constraint is now stated in the registry note, the structure contract and the docs-site
section with the measured numbers, so nobody has to rediscover it by hitting it.

step-cli is 81 tests; the broader focused set stays at 130.

* fix(step-cli): close live StepCode processes when the proxy stops

A 14-turn conversation on one thread held up: 0 failures, and exactly one `step` process
for all 14 turns, which is the reuse this route is built on. The same run also surfaced a
leak — a `step` process from an earlier probe was still alive after its proxy had been
stopped.

The sibling CLI routes cannot leak this way: they spawn a child per request and kill it in
a `finally`, so it cannot outlive a turn. This route deliberately keeps a process alive for a
whole conversation, so nothing was killing it on shutdown, and an orphaned `step` holds the
user's subscription session open. Sessions now register through `registerOptionalShutdownHook`,
which `server/lifecycle.ts` runs on stop.

Measured after the change: one `step` process during a turn, zero after the proxy is stopped
(previously one survived).

Tests: 82 step-cli tests, the broader focused set unchanged at 130.

* fix(step-cli): forward non-text tool results instead of collapsing them

A tool result is not necessarily text. `latestToolResult` concatenated only the text
parts and dropped everything else, which for a result carrying an image meant an empty
text block reached the model — the same misleading-"the tool returned nothing" failure the
wrong-call path already had, in a second place.

Content is now projected onto the blocks StepCode's SDK tool accepts (`text`, and `image`
as base64 + media type). Block boundaries are preserved rather than concatenated, because
StepCode maps each block 1:1 and joining would erase the difference between e.g. a tool's
stdout and its stderr. An inline `data:` image is forwarded; a remote URL cannot be, so it
becomes a note the model can act on instead of vanishing; a result with nothing readable
says so rather than looking empty.

Scope note: on the standard Codex path this layer is upstream of the adapter —
`src/vision/image-rewrite.ts` already rewrites image tool results to an explanatory
`[image omitted: this model is text-only ...]` placeholder for a text-only row. A live run
confirmed the model receives that explanation rather than an empty result, so this change
is the residual path (clients outside the vision rewrite, or a disabled sidecar), not the
fix for that case.

Live checks this round, against the real CLI:

  real client abort mid-turn -> 0 step processes left, and the same thread's next
                               request completes normally
  three threads concurrently  -> all completed, each with its own answer, no cross-talk
  four conversations          -> four processes, all reclaimed on proxy stop

* fix(step-cli): refuse a busy conversation with an explained, retryable error

The per-conversation queue added last round caps how many turns may wait, and the refusal
threw straight out of `runTurn` — an unhandled rejection, not an event on the stream. Every
other failure on this route becomes an error event, so this one path handed the caller a
generic failure instead of saying what happened. It now emits a retryable 409
(`step_cli_conversation_busy`) naming the conversation and the queue depth, then closes the
session it had just opened.

That refusal is the only thing standing between a retry storm and an unbounded wait, so it now
has its own coverage: turns on one conversation run in arrival order, separate conversations
never wait on each other, and a pile-up past the cap is refused instead of queued.

Also verified this round, against the real CLI:

  a compaction turn arriving WHILE a tool call is held  -> produces the synthetic `compaction`
  item with no error, and the same conversation's next ordinary turn still completes. The
  concern that a compaction turn would park state on the parent conversation (a bug cursor hit
  in the same area) does not apply here.

step-cli is 90 tests; the broader focused set stays at 130.

* fix(step-cli): register the turn before delivering a held tool result

Answering a held `sdk_tool.invoke` unblocks the CLI, and the CLI may answer with frames the
moment it does. The turn was registered AFTER that delivery, so any frame arriving in between
found no runtime to route it to, was dropped, and the turn then waited out its deadline on a
model that had already answered.

The turn is now registered first and the result delivered second. The decision about what this
turn IS (answer to the held call, abandoned call, or a fresh user message) was also hoisted
above the delivery so nothing inspects the transcript after a side effect.

The regression test makes the race deterministic rather than timing-dependent: the fake emits
`turn_complete` synchronously INSIDE `resolveHeldToolResult`. Reverting the order turns that
test red and restoring it turns it green, which is how the fix was confirmed to be the thing
the test is actually pinning.

step-cli is 91 tests; the broader focused set stays at 130.

* refactor(step-cli): split the adapter into five modules with a one-way graph

`adapter.ts` had grown to 957 lines carrying eight unrelated concerns: process lifetime, turn
runtime state, conversation serialisation, pool registry, shutdown wiring, frame mapping,
request projection and error wording. Everything about this route is now readable in one place
per concern, and the turn loop is the only thing left in the file that decides anything.

  adapter.ts       orchestration only: what one turn is, in what order, when it is terminal
  conversation.ts  conversation identity (which thread owns which process) and turn ordering
  events.ts        what the CLI says and what this peer owes it back
  projection.ts    pure request/response conversions, testable without a session
  registry.ts      the state that must outlive a request, plus shutdown wiring
  errors.ts        failure text and the status a client can retry on

The dependency graph is one-way: adapter → {conversation, events, projection, registry, errors},
events → {projection, registry, registry → pool, and nothing imports adapter. Two edges had to be
cut to keep it that way — `poolFor` now takes the session handlers as an argument instead of
importing `events`, and the idle timeout moved to `registry` where the pool that uses it lives.

`adapter.ts` went 957 → 394 lines. Behaviour is unchanged: 91 step-cli tests and the broader
focused set (121) pass, and the gates are green. The tests now import each symbol from the module
that owns it, so a move shows up as an import error rather than a silently relocated export.

Also removed a stray block left in `driveTurn` by an earlier patch.

* refactor(step-cli): keep modules from reaching into each other's state

Post-split review found the split was only half done: `events` and `adapter` were still
reading and writing `registry`'s WeakMaps directly (`turnRuntimes.get/delete`,
`lastAssistantUsage.set`, `lastQueryId.get/set`). That is exactly the coupling the split was
meant to remove, and it would have pinned the storage shape into three call sites.

`registry` now exposes semantic accessors — `beginTurn`, `currentTurn`, `endTurn`,
`recordAssistantUsage`, `assistantUsage`, `rememberQuery`, `currentQuery`, `forgetQuery` — and
the maps stay private to it. "Who owns this session's turn" is answered in one module.

Behaviour unchanged: 91 step-cli tests, the 130-test focused set, and the gates all pass, and
the full suite was compared against the clean baseline worktree in an interleaved window
(mine 160/0 and 160/0; baseline 159/1 and 160/0) after an un-interleaved comparison had
produced 66 phantom differences under load.

The structure contract now records the module layout and why the two dependency edges are cut
the way they are.

* docs(step-cli): name the remaining modules in the contract's layout table

The table listed six modules and then jumped to 'the framed transport itself', so
`env.ts`, `profiles.ts` and `constants.ts` were undocumented even though `session.ts`
depends on all three. Found while checking the refactor's dependency graph: the layering only
holds if those edges are written down.

* fix(step-cli): recover a turn that ends without a terminal event

The guard deciding "nothing terminated this turn" read
`if (!currentTurn(session) !== undefined) return;`. `currentTurn` returns a
turn or `undefined`, so `!currentTurn(...)` is always a boolean, and a
boolean is never `undefined` — the comparison was therefore always true and
every statement after it was dead code.

Introduced by the `refactor(step-cli): keep modules from reaching into each
other's state` commit, which mechanically rewrote the correct
`if (!turnRuntimes.has(session)) return;` while introducing the semantic
accessors: the opposite of that commit's stated goal.

Impact: on a client abort or the ten-minute terminal deadline, the recovery
never ran — no `step_cli_turn_abandoned`, no settle, no interrupt, no close.
The turn kept its registration and its query kept running inside StepCode,
which serves one query per process, so the next request on that conversation
collided with the abandoned one. A stream that simply stops is also
indistinguishable from a hung proxy.

The suite could not have caught it: on every tested path a terminal event
ends the turn first, which makes the guard's wrong branch indistinguishable
from the right one. Added coverage for the two paths that reach it — the
client abort and the deadline, the latter driven by an injected timer rather
than a ten-minute sleep — plus the normal-completion case that must NOT
recover, so the fix cannot be a blunt always-recover.

Also drops four orphaned doc comments the same refactor left behind.

* chore(repo): keep Bun's build cache out of history

Two 59.8 MB copies of Bun's on-disk build cache reached this branch's
history through a broad `git add -A`. Bun writes `<hash>-00000000.bun-build`
into whichever directory it runs in — here, the repository root — and the same
file reappears under a new hash on the next run, so a committed copy is pure
weight that nothing in the build, typecheck, or test path ever reads.

An ignore rule is necessary but not sufficient, for the same reason this repo
already guards `go/` and `.codexclaw/`: once a path is tracked, `.gitignore`
stops applying to it entirely. So the assertion belongs next to those, against
the real index.

This is the same shape as the mistakes this file already documents — `go/`'s
config_parity.go committed three times, the root `docs/` folder at 4.9 MB —
which is why the guard is an index assertion rather than another comment.

* chore(step-cli): drop a write-only turn field and duplicated doc blocks

`StepTurnRuntime.done` was assigned in `beginTurn` and never read by
anything: `driveTurn` awaits the local promise it created, and the runtime
needed only `settle` for the other callers. A field nothing consumes reads
as if it were part of the contract, so the next reader has to prove it
unused before trusting the surrounding code.

Also collapses the duplicated doc comment on `lastQueryId` and the orphaned
one-shot line that lost its declaration when `MAX_QUEUED_TURNS` moved to
`conversation.ts`. Both are leftovers of the module split.

* fix(step-cli): keep queue refusals off the owner's session and guard a held call with no result

Addresses review at 17ce58e: a turn refused at MAX_QUEUED_TURNS never owned the conversation, so it no longer closes the session serving the accepted turn and its queue. A held call followed by user text with no toolResult no longer dereferences an undefined result; the held frame is refused and the new text runs. Both covered through runTurn with an injected session.

* test(layout): register step-cli tests in their own explicit shard

Adding the seven step-cli entries to layout.json took it to 2006 lines,
past the file-size ratchet's 2000-line threshold. Move them into
layout-step-cli.json and list it in explicitShards, as the other
feature shards do, which brings layout.json back to its 1999 lines on dev.

* docs(structure): fold the StepCode transport pointer into the coding-agent paragraph

Keeps structure/providers-and-adapters.md within its 600-line budget after merging dev.

* fix(step-cli): bind caller and query ownership through shutdown

Namespace sessions and held calls by the admitted principal and physical
provider. Keep keyless requests private and close failed handshakes.

Correlate runtime callbacks and declared permissions with the exact query,
retain the held call's catalog, and drain an abandoned query before its
replacement acquires a turn. Latch pool shutdown and drain outstanding opens.

Reuse the coding-agent Windows process-tree terminator with a deadline and
verify OS exit before releasing handles. Preserve bounded POSIX group cleanup.

Port the independent review probes into registered adapter regressions.
Baseline b833c1f: 1 pass / 13 fail. Fixed focused run: 325 pass / 0 fail.
Typecheck, structure, privacy and documentation build passed.

Co-authored-by: Hong Liu <88263959+Hylouis233@users.noreply.github.com>

* fix(step-cli): retain cleanup ownership through termination failures

Reserve closing and quarantined handles, bound termination to two attempts,
and drain cleanup receipts started before pool shutdown. Retain failed pools
through registry clears so they cannot admit replacement processes.

Co-authored-by: Hong Liu <88263959+Hylouis233@users.noreply.github.com>

* test(step-cli): bound registry fixture lifetime and spawn deadlines

Flush the isolated registry observations and exit the fake-only helper when
they are complete. Await its subprocess asynchronously with the named
internal deadline below the spawn test budget. Preserve quarantine assertions.

Publish native fixture PIDs atomically after reproducing a partial JSON read.

Co-authored-by: Hong Liu <88263959+Hylouis233@users.noreply.github.com>

* test(step-cli): warm the registry fixture and wait for native reaping

* docs(step-cli): publish English and Spanish guides and recount presets

* docs(structure): record shared Windows taskkill deadline

* fix(gui): classify StepCode as a paid subscription CLI

* fix(gui): use adapter-specific subscription details in classic setup

* fix(step-cli): correlate official SDK callbacks to the active query

* fix(step-cli): classify child failures before publishing errors

* fix(step-cli): await shutdown and confirm POSIX process-group exit

* fix(step-cli): resolve executable and workspace before spawn

* fix(step-cli): keep tree cleanup within the proxy stop window

Await an asynchronous Windows taskkill receipt and cap concurrent
session cleanups across pools. Preserve cleanup retries, quarantine, and
the synchronous process-tree helper used by other CLI adapters.

Use the configured drain deadline and the controller's exit grace for
the optional teardown join, leaving time for listener cleanup and exit.

* fix(step-cli): use the proxy stop deadline for tree cleanup

Share the stop deadline with active and queued session closes, and
escalate before the deadline to leave time for exit confirmation.
Sweep remaining owned POSIX groups synchronously on incomplete
shutdown and start queued Windows tree kills even if slots are busy.

* fix(step-cli): require ownership for process group cleanup

Keep POSIX group disappearance sticky across probes, retries, and
emergency teardown. Revalidate through the unreaped leader after a
failed attempt, and report unverified cleanup without signalling
the group.

Exercise the emergency sweep with an inert process table and wait
for actual fake-child cleanup in the run-turn shutdown test.

* fix(step-cli): limit process group signals to live leaders

Use the detached child handle to gate every POSIX group signal and to
confirm exit after escalation. Quarantine the session if its leader
exits before group termination, including during an emergency sweep.

* test(gui): verify shared subscription CLI warning copy

* docs(step-cli): record accepted POSIX cleanup risk

* chore(step-cli): reconcile preset counts and layout with dev

* fix(step-cli): guard process cleanup and cancelled dispatch

* docs(step-cli): record the accepted Windows cleanup risk

* docs(providers): recount presets after rebasing StepCode

* test(step-cli): cover cleanup rejection after terminal event

* fix(step-cli): handle terminal cleanup rejection

---------

Co-authored-by: mavis <mavis@local>
Co-authored-by: Hylouis233 <Hylouis233@users.noreply.github.com>
Co-authored-by: JUN <243035832+lidge-jun@users.noreply.github.com>
Co-authored-by: JUN <jun@lidgeai.com>
…uota rows again (lidge-jun#9004)

* test(gui): pool settings collapse to header and quota rows stack (failing)

Red first: 7 of 10 disclosure cases and both quota-row cases fail on d61cca1.

* feat(gui): pool settings collapse to title and switch; quota rows stack again

Claude, Claude Pool 2 and Codex usage-based switching cards show only their title and on/off switch; the title is an APG disclosure button that remembers per card whether it was opened. Closing settles an in-progress threshold edit and remounts the details so a portaled Select menu cannot outlive them. A load failure or the two-account requirement stays visible because it is why the switch is disabled.

AccountQuotaTable's card layout lists each pool's name, 5-hour bar and weekly bar on separate lines again, as v2.100.5 did before lidge-jun#8740 put them side by side.

* docs(structure): stacked quota rows and collapsed pool settings cards

* test(gui): pool card survives a localStorage getter that throws (failing)

* fix(gui): collapse store tolerates a localStorage getter that throws

Resolving the global inside read()/write()'s try keeps blocked site storage (SecurityError from the getter) a missing preference instead of a render crash; PoolSettingsDisclosure reads the store in a useState initializer.
…et Home hide it (lidge-jun#9007)

* feat(gui): drop Start at Login from the desktop checklist and let Home hide Getting started

Inside the OpenCodex desktop app, the app's install and first run already turn
Start at Login on, so Home and the Set up hub no longer list that step there
(Home reads "X of 2"). The browser dashboard keeps its step unchanged.

Home's Getting started card gains a Hide control, remembered per browser
profile in localStorage; Recent errors and the other Home cards stay. Hiding
offers Undo for that visit, and the Set up hub brings the card back with
Show on Home. Copy for all 11 locales lives in getting-started-copy.ts.

* fix(gui): keep the Getting started choice when storage reads fail

Writable but unreadable storage made Hide revert on the next read; the store now
answers with the last choice made in this window. Only localStorage events
reconcile the choice, so a sessionStorage clear elsewhere cannot drop an
unsaved one. The Set up hub test asserts where focus lands after Show on Home.
lidge-jun#8899)

* fix(anthropic): refund sidecar hop when account rotation throws

Release the still-unused credential-hop reservation before propagating an account rotation failure or cancellation. Preserve the original error and verify no replacement dispatch occurs. Follows the residual recorded in upstream lidge-jun#8871.

Co-Authored-By: Claude Code <noreply@anthropic.com>

* docs(spend): distinguish sidecar thrown and null rotation exits

Clarify that inline throttle-wait cancellation returns null while a thrown rotation error propagates unchanged. Both exits release the unused hop.

Co-Authored-By: Claude Code <noreply@anthropic.com>

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
Cursor lists gemini-4-hydrogen (low..xhigh, default high) and gemini-4-carbon (low..high, default medium) with 1M context, but the static Cursor catalog only had gemini-4-argon, so live discovery dropped both rows. Add both to the capability table and effort tiers, and default Hydrogen to high.
… gemini-4-neon (lidge-jun#8970)

* fix(google-vertex): nest tool-result images for Gemini 3+ and catalog gemini-4-neon

* docs(structure): record Vertex Gemini 3+ tool-image scope in ADR-8969

---------

Co-authored-by: Hirory <silver_latches0o@icloud.com>
…Models (lidge-jun#9008)

* feat(gui): switch models on/off from Providers and an Overall tab in Models

Providers > provider > Models lists every model, including off ones, each with
an on/off switch writing PUT /api/model-visibility through the shared queue,
owned by ProviderWorkspaceShell so a provider switch never cancels a write.
Models gets an Overall tab (#models/overall): every model across providers in
one searchable list with All/On/Off filters, sharing the catalog's rows,
visibility rule, write queue and poll guard.

* fix(gui): disable provider switches during Delete consent; flag stale Overall list

Review follow-ups: switches render disabled while the Delete dialog holds the
flight, and Overall shows the catalog's load-failure notice when a background
refresh fails after a good load. Search drops the ReactNode model label.

* test: register the Overall tab hash in the Models routing contract

* docs(devlog): record fb-models outcome

* fix(gui): keep the provider visibility waiter out of render closures

react-doctor (react-compiler MemoDependencies) flagged refresh's useCallback for
capturing a per-render settle function. Settle is now a module-level helper over
the ref, so every callback closes only over stable refs.

* docs: describe the provider Models tab count and the queued-change warning in every locale

CodeRabbit review on lidge-jun#9008: the provider count paragraph now says it is the
provider-list count and describes the Models tab's on/total header; fr, ja, ko,
ru, tr and zh-tw gain the warning that unsent queued visibility changes are
discarded on leaving, which en, es and zh-cn already carry.

* docs: state the full on rule and the Providers leave warning in every locale

CodeRabbit round 2 on lidge-jun#9008: a model is on when it is not disabled and it is
native, its provider has no allowlist, or the allowlist includes it (the
modelIncluded rule); leaving the Providers page mid-save can cancel the
request and the next load shows whether it saved.

* docs(tr): name the native-model exception without the local-server sense of yerel

CodeRabbit round 3 on lidge-jun#9008.
…#8946)

* fix(claude): avoid repeated disabled model scans at launch

Keep the authenticated launch view out of dashboard-only preview work and
check raw and encoded exclusions through the existing set. Report a context
read timeout explicitly without changing its deadline.

* test(catalog): move the disabled-slug exclusion case to its sibling file

codex-catalog.test.ts is capped at 7985 lines by the file-size ratchet; the
added case grew it past the cap. Move the case byte for byte into the existing,
already-registered codex-catalog-exclusions.test.ts.

* test(claude): prove the launcher view skips alias previews (lidge-jun#8945)

On the base, GET /api/claude-code?view=launch built every dashboard alias
before its early return; the launcher never reads them. Spy the alias builders
and require zero calls for the launch view.

---------

Co-authored-by: JUN <jun@lidgeai.com>
…un#8952)

* fix(catalog): reuse provider policy across static model rows

* fix(catalog): project only the current capability row

* test(catalog): prove captured static rows reuse provider policy (lidge-jun#8951)

Exercise the existing capture -> applyProviderConfigHints entry points. On the
base, 50 static rows call resolveModelPolicy 50 times; with the prepared policy
they call it zero times while keeping every per-model context window.

* test(layout): register the catalog-reuse test in the providers shard

The root layout.json is at its line cap; keep the new registration in
layout-providers.json instead.

---------

Co-authored-by: JUN <jun@lidgeai.com>
…idge-jun#8964)

* fix(qoder): recover daily-limit and CN 403 pricing-URL quota errors

Handle Qoder CLI daily-limit and Qoder CN 403 pricing-URL quota
exhaustion so multi-key API-key pools rotate cleanly without leaking
synthetic pre-error notices:

- Normalize pure-numeric string error_code values ("105", "110", "114",
  "118", etc.) and keep any other explicit error_code (including
  non-numeric codes such as "PERMISSION_DENIED" and oversized integer
  strings) authoritative over CN pricing-URL and text fallbacks.
- Classify qoder-cn's verified `inference.remoteChat.stream failed (403)`
  JSON response carrying exact `https://qoder.com.cn/pricing` (when
  error_code is absent, 403/"403", or live qodercn 1.1.91's 112/"112",
  with no non-403 error code on the response JSON object or its
  top-level error/data object) as 429 insufficient_quota with
  apiKeyRecovery: true; keep Global, bare 112, and non-quota 403s
  non-recoverable.
- Recognize qodercli 1.1.81's account-daily wording ("You have reached
  the daily usage limit") alongside the legacy Chat wording when no
  explicit error_code is present.
- Suppress Qoder CLI's exact recoverable-error preamble in
  suppressQoderErrorPreamble downstream of guardQoderScaffolding (so
  stripped <system-reminder> frames never disable notice holding),
  carrying the classifier's failure reason in a per-turn closure so
  redacted error cloning never loses it and mismatched/non-recoverable
  notices stay turn output.
- Update adapter/E2E tests, structure SSOT docs, and EN/ES API key
  catalog docs.

* fix(qoder): keep CN 403 denials that name a non-quota cause out of key recovery

A qoder-cn 403 body that links the pricing page but says, for example,
"Permission denied" was classified as resource-pack exhaustion, so the key
pool rotated away from a healthy key and cooled it down. Reject the pricing-URL
signature when a string field of the payload or its error/data object names a
non-quota cause, and cover it at the adapter and server failover levels.

* fix(qoder): accept only the pricing-only CN 403 shape as quota evidence

A deny-word list still let other explanatory 403s (for example an account
lock) rotate keys. Recovery now requires the verified shape: pricingUrl plus at
most 403 code fields. Add an account-lock negative at the server failover level.

---------

Co-authored-by: JUN <jun@lidgeai.com>
…Sol template (carry of lidge-jun#8891) (lidge-jun#9010)

* fix(codex): promote retained GPT-6.2 fallbacks written from an older Sol template

Before lidge-jun#8893 pinned GPT-6.2, a providers.openai.models entry for gpt-6.2-sol or
gpt-6.2-astra borrowed GPT-6.1 Sol's row (send_user_message_async, clock). Sync
upgraded only discovered rows, slug-labelled rows and self-authored guesses, so
those retained fallbacks never received the models' own tools and instructions.
Recognize an unchanged historical fallback by its generated name, the historical
description and a byte-identical borrowed payload, and promote it from the pin;
any user edit keeps the row.

Carried from lidge-jun#8891.

Co-authored-by: Nick Davis <inbox@nickdavis.io>

* fix(codex): require every borrowed field unchanged before promoting a fallback

Comparing six fields let promotion overwrite other user edits, such as
input_modalities or tool_mode, because the merge replaces the whole row. Compare
every field of the projected historical template, exempting only identity and
build-derived fields, and reject added fields. Verified against the real rows
generated at c320932^.

* fix(codex): check build-derived fallback fields against their historical values

Exempting shell_type and effective_context_window_percent still let promotion
overwrite a user's edit of them. Require the exact values the pre-lidge-jun#8893 builds
wrote (unified_exec, 95, source priority 1, 244,800 compaction limit, no
availability prompt, WebSocket preference absent or the template's), and only
exempt identity fields.

* fix(codex): look up derived fallback values in a Map

A persisted key such as constructor resolved to an inherited Object property and
crashed the catalog merge. Use a Map and cover constructor/toString keys.

---------

Co-authored-by: Nick Davis <inbox@nickdavis.io>
…es (lidge-jun#8957)

* fix(logs): show native Gemini protocol traces

* fix(gemini): expose live-discovered Antigravity models

* fix(gemini): report native token usage in request logs

* fix(gemini): scope listed tiers and add official rate estimates

* feat(gemini): expose native switch and report reasoning and timing

* fix(gemini): record native route decisions in request logs

* fix(gemini): route native requests by account model support and log retries

* fix(gemini): honor implicit OAuth mode in account selection

* feat(logs): show upstream accounts and known Gemini retry costs

* test(gui): separate passthrough settings reads from account imports

* fix(gemini): enforce and settle shared token budgets for native generation

* docs(logs): explain the native Gemini decode window rule

* docs(logs): list Gemini as a generation window source

* docs(logs): distinguish protocol generation start events

* docs(logs): clarify decode rate availability

* feat(gemini): add gateway API toggle and usage example

(cherry picked from commit c49aab437ebcc7ee3cded7bfb69d30893cdceaef)

* fix(gui): localize the Gemini endpoint label in Traditional Chinese

* test(usage): move the Antigravity Gemini 4 price case to a sibling file; sync Spanish docs

usage-cost.test.ts grew past the 2,000-line ratchet threshold; the case moves
byte for byte into usage-cost-antigravity-gemini4.test.ts (registered in the
usage shard). The Spanish server reference now names apiSurfaces.gemini.enabled
as the English page does.

* fix(gui): keep the telemetry-contract types in a type-only import

request-outcome-agreement requires Logs.tsx to import AttemptRecoveryKind via
import type from the contract leaf. Split the value import of
ACCOUNT_LOG_LABEL_RE into its own statement.

---------

Co-authored-by: Liang-Psych <19504206+Liang-Psych@users.noreply.github.com>
Co-authored-by: JUN <jun@lidgeai.com>
…idge-jun#9014)

* test(gui): an Overall switch survives a poll read during its write

Covers the acceptance item directly: a catalog poll tick returning the
pre-write state while the PUT is held leaves the switch on, and the settled
read confirms it. Fails if Overall stops reading through the shared queue.

* test(gui): wait for the settled read before the final Overall assertions

CodeRabbit on lidge-jun#9014: switches stay enabled while a write is pending, so the
old wait passed immediately. Wait for the Saved toast, which the queue
publishes only after its authoritative read, when the override is dropped.
… whole target (lidge-jun#8880) (lidge-jun#9011)

* fix(combos): a main-account 429 in the Codex pool no longer parks the whole target (lidge-jun#8880)

The Codex pool logs the main ChatGPT account as <provider>-main, which is not a codexAccounts
entry, so cooledPoolAccountLabel never attributed its 429 to an account. The combo then cooled the
target for the upstream Retry-After (up to 24h) and answered 503 with zero attempts even after main
recovered. In pool mode (explicit or the canonical default) pool selection already skips a cooled
main (src/codex/routing/selection.ts), so the 429 is account evidence like any pool account's.
Direct mode keeps the target cooldown: nothing local refuses a cooled main there.

* fix(combos): attribute the main account's 429 from its account label (lidge-jun#8880)

Review: a real pool dispatch logs the main account under the bare provider name and carries
"main" only in accountLogLabel (stamped for pool/main-pool contexts alone), so the label never
reached the attribution as <provider>-main. Derive it there. End-to-end tests drive a combo
through handleResponses with a native main login and a spent pool sibling: pool mode leaves the
target selectable and a recovered main serves the next request (fails without this commit);
direct mode with a caller-owned main still parks the target and sends nothing next.

* docs(structure): record main-account 429 attribution in the combo owner doc; pin the test token (lidge-jun#8880)

- structure/ops/service-logging.md (owner of core-combo.ts): how the child log's pool label or
  "main" account label decides whether a 429 cools the combo target, and why direct mode keeps the
  target cooldown.
- The end-to-end test captures one main bearer per test instead of rebuilding it (its exp claim
  follows the clock), so main is identified the same way on every request.
…idge-jun#8997) (lidge-jun#9009)

* fix(command-code): keep System One decision models off chat surfaces (lidge-jun#8997)

Command Code lists typesafe/jev and typesafe/jev-1.14.0 in /provider/v1/models but serves them
only at POST /provider/v1/systemone, so offering them as chat rows sent every chat request to an
endpoint that answers 403.

- Discovery for both Command Code presets drops typesafe/jev* rows (shared noneOf filter).
- A request that still names one (explicit, stale or encoded selection) is refused with a 400
  that names /provider/v1/systemone and a JEV combo, before any upstream send: one guard in
  createRegisteredAdapter covers every provider on api.commandcode.ai, and the native Chat lane
  declines the route so it reaches that guard.
- The refusal is a fixed proxy sentence, passed through by the Chat and Messages presenters.

* docs(adapters): note Command Code decision models are not chat models (lidge-jun#8997)

* fix(command-code): refuse decision models before sidecars and let combos move on (lidge-jun#8997)

Review follow-up:
- The Responses pipeline refuses a Command Code decision model before sidecar auth or sidecar
  work, so a vision sidecar never describes images for a request no chat endpoint serves. Each
  combo or policy candidate runs this pipeline.
- The refusal is 404 model_not_found (OpenAI's own shape for a non-chat model), which combos read
  as target-local: a combo listing a decision model serves from its next target.
- The id predicate is anchored (^typesafe[/-]jev), so no claude-* id pinned to the API-key
  preset's Messages wire can match.
- Tests: image-bearing request with a blind model and a routed vision sidecar sends nothing; the
  combo test asserts the sibling's exact send and a 200.

* fix(command-code): align decision-model matching, skip policy candidates locally (lidge-jun#8997)

Review round 2:
- One predicate for discovery and admission: native ids are refused exactly when discovery hides
  them (substring typesafe/jev); the encoded typesafe-jev form stays prefix-anchored.
- The early refusal moves to src/server/responses and carries policy-candidate provenance, so a
  routing policy skips it without committing a hop or making it the next decision's source.
- The native Messages lane also declines a decision route (compatibility-reject).
- docs: the refusal is 404 model_not_found; combos and policies move on.

* fix(command-code): fold slashes so encoded slugs of hidden ids are refused (lidge-jun#8997)

Review round 3: discovery and admission now share one rule. An id is a decision model when,
with every slash folded to a dash, it contains typesafe-jev; discovery hides both spellings, so it
hides exactly what admission refuses, and every Codex-facing encoded slug of a hidden id is
refused too (empty-cache dispatch covered for both presets).

* docs(es): mirror the Command Code decision-model note in the Spanish adapters reference (lidge-jun#8997)

* test(responses): register command-code-decision-refusal in the core module map (lidge-jun#8997)

* fix(command-code): refuse decision models before transport preparation (lidge-jun#8997)

CodeRabbit: the refusal ran after prepareResponsesTransport, so the OAuth preset resolved (or
refreshed) a credential first; with no usable credential it answered 401, which a combo reads as a
provider-wide credential failure and uses to cool sibling targets on the same provider. The
refusal now runs right after request preparation; a refused candidate is not reported as a
compaction-recovery source route, since nothing was sent. Tests: no login and an expired
credential both get the 404 with no send; a combo moves on without cooling a same-provider sibling
(both fail with the old ordering).

* test(command-code): correct the expired-credential comment (lidge-jun#8997)

* test(command-code): assert the expired credential is left untouched by the refusal (lidge-jun#8997)
…Provider (lidge-jun#8849) (lidge-jun#9012)

* fix(gui): Escape over a page dialog closes only that dialog, not Add Provider (lidge-jun#8849)

The Add Provider modal listens for Escape on window and only knew its own overlays. Dialogs the
providers page opens above it -- the OAuth risk warning of an Accounts-tab login, the Codex login,
and the remove / unsaved-changes confirmations -- were invisible to that guard, so one Escape closed
both layers. The page now tells the modal when one of its dialogs is open (stackedOverlayOpen).

* fix(gui): Escape cancels the remove and unsaved-changes confirmations (lidge-jun#8849)

Review: with the page telling Add Provider to leave Escape alone, the two plain alertdialog
confirmations (remove provider, unsaved changes) had no Escape path of their own, so Escape did
nothing while one was stacked. Both now cancel on Escape (the unsaved-changes dialog not while its
save is in flight). The composition test now uses stateful page callbacks and delivers Escape in
browser order (keydown first, then the native dialog cancel when not prevented), and asserts the
top layer closes first and Add Provider on the next Escape.

* fix(gui): a confirmation answers Escape only when it is the topmost layer (lidge-jun#8849)

Review: the Settings tab's unsaved-changes confirmation is mounted in the page body, outside the
Add Provider modal's stackedOverlayOpen guard, and can stay open while Add Provider (and the OAuth
warning) open above it. Its window Escape listener then cancelled it from underneath, and its
preventDefault could suppress the warning's native cancel. Confirmations now act only when their
own backdrop is the topmost open layer (a native modal dialog is always above in-page overlays),
and otherwise neither handle nor prevent the key. Two stateful multi-layer tests cover it (fail
without the check).

* fix(gui): Escape follows visual stacking across page and modal layers (lidge-jun#8849)

Review: document order is not the visual order -- .dialog-backdrop (z-index 900) paints above the
Add Provider .modal-overlay (--z-modal), so a Settings confirmation left open could appear above a
later Add Provider. Escape ownership now comes from one helper (gui/src/components/overlay-layers.ts):
an open native modal dialog first, then the highest computed z-index, document order breaking ties.
Both the confirmations and Add Provider consult it. Add Provider also ignores an Escape another
layer already prevented: in a real browser the confirmation's cancel can remove its backdrop before
Add Provider's listener runs, which closed both layers on one key.

Real-browser check (GOAT preview, source build): Settings unsaved-changes confirmation over Add
Provider -> first Escape closes the confirmation, second closes Add Provider. Tests: z-index case
and prevented-Escape case (each fails without its guard).
…en hydration data is gone (lidge-jun#8994)

* fix(m365-copilot): read the web-session account from the chat HTML when hydration data is gone

Signed-off-by: Бат-Орших <34618353+orshih6@users.noreply.github.com>

* fix(m365-copilot): stop a cancelled login before reading cookies after the HTML fallback

The server-HTML fallback is an awaited page fetch; a login cancelled during it
could still return valid HTML and proceed to Network.getCookies. Check the abort
signal after that await, and cover an abort that races a valid page.

* fix(m365-copilot): bound the HTML fallback in size, time and origin

The page-side fallback read the whole chat HTML with r.text(): an oversized or
never-ending body could exhaust memory or hold the login past its deadline, and
a redirect off the Copilot origin was not rejected. Stream the body with the
discovery path's 2 MiB cap, abort after 10 s, and reject a final URL outside
the Copilot origin. Test the captured expression against oversized, stalled
and redirected responses.

* fix(m365-copilot): cancel a rejected HTML fallback response

A non-OK or off-origin response returned early without consuming or cancelling
its body, so a streaming response could stay in flight across polls. Abort the
request on those exits and assert the signal is aborted.

---------

Signed-off-by: Бат-Орших <34618353+orshih6@users.noreply.github.com>
Co-authored-by: JUN <jun@lidgeai.com>
lidge-jun#8972, lidge-jun#8999, lidge-jun#8985) (lidge-jun#9018)

* docs(devlog): plan the fb2100 Remote Link Child auth and Windows units

* fix(link): read Windows_NT through the quote cmd leaves on a Windows Child (lidge-jun#8972)

Win32-OpenSSH runs an exec request as cmd.exe /c "<command>". With the
bare "cmd /c echo %OS%" probe cmd keeps those quotes and prints
Windows_NT" (reproduced locally with cmd.exe), so Home-initiated
enrollment of every Windows Child failed with an opaque 502.

- WINDOWS_OS_PROBE is now "cmd.exe /c echo %OS%", which prints a clean
  Windows_NT.
- isWindowsNtAnswer accepts one trailing quote in all three parsers, so
  a shell that still adds it is understood.
- Platform discovery failures throw SshDiagnosticError with a bounded
  stderr reason; sshRunnerErrorHint reports it, so probe_failed and
  ocx link cleanup say why instead of looking like an SSH outage.

* fix(link): let a Child's admin token read the Home's quota pool (lidge-jun#8999)

GOAT reads a Home's ocx.quota-pool/1 through each Remote Link Child at
/api/machine/hub-relay/api/quota-pool with the Child's local admin
token. The link-Child relay branch admitted only a dashboard session and
answered 401, so every Child showed "OpenCodex pool unavailable".

The Child's listener now also admits its own admin-token principal for
exactly GET and HEAD of /api/quota-pool (linkChildAdminReadAllowed). The
parsed path must match exactly, the relay's refresh-key refusal still
applies, every other relay path keeps requiring the dashboard session,
and the Home only ever sees the link key.

structure/quota-pool.md and structure/remote-link.md name the credential.

* fix(gui): the Child's Remote Link page reads its own status and shows how to disconnect (lidge-jun#8985)

On a connected Remote Link Child the page asked the Home relay for
/api/link/status, which the relay refuses as a Home management read
(403 link_child_read_only). The page then showed "Remote link request
could not be completed", the off switch, and no way out of the link.

- RemoteLink reads its status from statusApiBase, which App sets to the
  Child's machine listener, and gates that read and the page on the
  Child's own session; Home operations keep the shared plane.
- gui/src/api.ts classifies /api/link/status and /api/link/diagnostics
  on a link Child's machine target as machine-plane requests, so they
  carry the Child's session instead of none.
- A connected Child shows "Disconnect this computer" with the commands
  that end the link: ocx disconnect --expect-link <id> and ocx restart.
  The dashboard still cannot change the link itself; the Child listener
  refuses dashboard-session writes by design.
- Copy lives in gui/src/i18n/remote-link-child-copy.ts for all 11
  locales.
…ta/reset parity (lidge-jun#9013)

* docs(devlog): plan Grok media and quota parity against live xAI/OpenAI behavior

* feat(images): default the Grok image bridge to grok-imagine-image-2.0 and send quality

grok-imagine-image-quality was retired on 2026-11-02 and is served as 2.0 at
low quality, so the old default ignored the requested quality. The bridge and
the /v1/images relay now default to grok-imagine-image-2.0, forward quality
(low/standard -> low, medium/high/hd -> medium, auto) to 2.0 only, accept the
full xAI aspect-ratio set, map 1024x1536/1536x1024 to 2:3/3:2, forward up to
five edit sources, and return xAI validation errors only as canonical messages
rebuilt from a closed vocabulary.

* feat(videos): support Grok Imagine Video 1.5, 1080p and pinned frames

The video bridge defaulted to the classic grok-imagine-video (720p, no frame
pins). It now defaults to grok-imagine-video-1.5-lite, advertises only what the
configured model accepts (1.5: 1080p, first/last frame, four keyframes, 14
references capped at 720p; Lite: first frame and 1080p; classic: first frame
and seven references; unknown models keep the old surface), forwards image,
last_frame, keyframes and reference_images in xAI's shape, and reports xAI
validation errors and failure codes only as canonical messages.

Image inputs are https or data:image URLs, or references to images the image
bridge downloaded in this process, which resolve to the recorded xAI URL; no
local file is read, and those references are only sent to the pinned xAI host.

* fix(images): bound quality error details and align edit-source limits

Review follow-up for the image bridge. A quality-list validation message is
returned only with at most the four known values, each once, rebuilt in
canonical order. The /v1/images/edits relay drops duplicate sources before the
five-source limit, matching callXaiImages, and the guides now say the limit
applies to that relay while the image_gen bridge tool sends one image.

* fix(videos): refuse unsupported video settings and keep safe poll detail

Review follow-up for the video bridge. An explicit resolution or aspect ratio
the configured model cannot honour is now a tool error instead of being
dropped, which would have bought a video at the upstream default. A permanent
poll failure keeps the allowlisted xAI detail (attached as a separate field by
the client) and still never the raw upstream message.

* fix(codex): keep non-expiring reset credits and calibrate Pro 100/500 capacity

The official Codex client types a reset credit's expires_at as optional, but
the management DTO dropped any credit without a string expiry. Such rows are now
kept with expires_at: null, together with the display fields the backend sends
(reset_type, status, title, description, bounded) and total_earned_count; ids
stay private. The auto-redeemer, which schedules by expiry, still sees only
expiring credits.

Pool capacity weighted Pro 100 (prolite) at the pre-2026-10-29 5x and had no
Pro 500 (promax), which counted as one Plus seat. They are now 10x and 50x Plus,
per OpenAI's 2026-10-29 doubling and staff-published multipliers.

* docs(images): record remaining Grok/OpenAI non-LLM decisions and fix the video default comment

* fix(gui): show non-expiring Codex reset credits as "No expiry"

The reset-credit endpoint now returns expires_at: null for credits without an
expiry, which the dashboard passed to the date formatter as the Unix epoch, so
such a credit read "Expires Jan 1, 1970 (0d left)" and was marked urgent. The
credit item now shows a localized "No expiry" line without urgency; dated
credits are unchanged.

* fix: guard reset-credit auto-redeem order, refuse invalid video durations

Final-review follow-up.

Consume names no credit and the dashboard says the oldest is used first. Now
that non-expiring credits are visible, the auto-redeemer also receives them and
stands down ("order-not-guaranteed") when a credit granted before the one it
protects could be spent in its place.

An explicit video duration outside 1-15 whole seconds (or a non-numeric one)
is a tool error instead of being clamped or dropped before a paid call; the
numeric string form xAI accepts ("8") still works.

The pool-quota regression expectations follow the Pro 100 weight of 10
(weighted weekly 71 % instead of 66 %).

* fix(codex): auto-redeem fails closed on tied or unorderable reset-credit grants

An equal grant time has no known consume tie-breaker and a missing or
unparseable one cannot be ordered, so either now stops automatic redemption
like an older credit does. The redeemer's inspect reads every upstream row,
passing a row without a grant time on as unorderable; the display DTO is
unchanged.

* fix(codex): never plan auto-redeem for a reset credit without a usable grant time

A credit whose grant time is missing or unparseable has no identity the
redeemer can protect, so it is never selected; it still blocks other plans as
an unorderable competitor. The guard also rejects an unparseable planned grant
time before checking competitors.

* fix: treat identical reset credits as a tie, scope quality to 2.0, advertise all image ratios

Final-approval review follow-up.

- Auto-redeem excludes exactly one row as the planned credit; a second row with
  the same grant and expiry is a distinct credit with an unknown consume order,
  so the redeemer stands down.
- quality is forwarded to grok-imagine-image-2.0 only; another 2.x model has to
  opt in explicitly rather than receive a field it may reject on a paid call.
- The image_gen tool advertises every aspect ratio the xAI client forwards
  (adds 9:19.5, 19.5:9, 9:20, 20:9, 1:2, 2:1).

* fix(images): refuse an edit relay request with any unusable image source

Final-approval review follow-up: a source the relay cannot represent as a URL
(an empty string, a file_id entry, an object without a URL, a non-string) used
to be dropped while the remaining sources went to a paid edit. The whole
request is now a 400 before any upstream call.

* fix(images): validate every edit relay source as an https or image data URL

Final-approval review follow-up: an explicit null source was still ignored and
any non-empty string was forwarded. Each supplied source (null included) must
now be an https URL without credentials or a base64 PNG/JPEG/WebP data URL,
otherwise the request is a 400 before any upstream call.

* fix(images): check every URL property of an edit entry and require canonical base64

Final-approval review follow-up: an images[] entry contributed only its first
URL-bearing property, so {image_url: null, url} slipped through and a second
valid property was dropped; and any run of base64 characters (====) passed
as an image data URL. Each image_url / image_url.url / url property is now a
source in its own right, and a data URL needs whole base64 quads with padding
only at the end.

* fix(images): require canonical base64 padding bits in edit data URLs

Final-approval review follow-up: a payload such as AB== passed the alphabet,
length and padding-position checks although its unused bits are non-zero. The
payload must now round-trip through decode and re-encode unchanged.

* fix(videos): refuse mode-specific settings xAI cannot honour (CodeRabbit)

CodeRabbit follow-up. Before any paid call the video tool now also refuses:
1080p with last_frame or keyframes (they make it reference-to-video, which
stops at 720p, like references already did); a keyframe outside the effective
clip when duration is omitted (xAI's 8 s default); image plus references on the
classic model, which rejects the mix; and an aspect ratio on plain
image-to-video, where xAI keeps the image's own ratio.

An xAI error body that stalls or is aborted while its detail is read no longer
hides the HTTP status: detail extraction is best effort, so a permanent poll
failure (e.g. 401) still stops polling instead of being retried as transient.

* docs(videos): translate the video_gen parameter and model tables in all locales

CodeRabbit follow-up: the eight translated video-bridge guides carried the new
parameter rows, the refusal note and the model-table headers in English.

* fix(videos): reject colliding keyframe slots and over-long classic reference clips (CodeRabbit)

xAI snaps keyframes to a 1/3-second grid and rejects two in one slot, and the
classic model limits reference-to-video to 10 seconds. Both are now refused
before the paid submit; 1.5 references keep 15 seconds.
…idge-jun#8984)

* test(settings): align isolated route tests with their child deadline

* test: retain isolated settings child output on spawn errors

Report status, signal, stderr and stdout using the original spawn error so callers can still inspect its code. The existing 30-second child and 35-second parent limits remain in effect.

Windows x64, Bun 1.4.4: 49 affected tests passed and type checking passed for 2,681 files. A short child that wrote to both streams before timing out retained the ETIMEDOUT object and both markers. A separate child exiting with code 7 preserved its status and both markers.

---------

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
Pack each version's two local packages in one real npm invocation and reuse only Node's compiled code within the fixture-owned root. Keep fresh per-command npm config and package caches, the separate real installation, existing readback assertions, and CI budgets unchanged.
…un#8950)

* perf(command-code): reuse normalized tools for text recovery

* docs(command-code): name the shared schema normalizer

---------

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
Match negation asides at their semantic tokens, then fold surrounding whitespace in one forward pass. Preserve the bounded classification window and retry decisions. Add boundary, matcher-start and in-memory retry coverage.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
…#8983)

* fix(providers): bound reasoning-effort diagnostic analysis

* docs: separate reasoning-effort diagnostics from the refusal grammar

---------

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
…-jun#8976)

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
luvs01 and others added 14 commits November 21, 2026 15:37
…idge-jun#9025)

* fix(cli): explain recovery from terminal startup readiness failure

* docs: use the registered Codex home for service recovery

* docs: distinguish service home repair from migration

* docs: verify native restore and readiness when moving a service

* docs: finish pending Windows teardown before changing homes

---------

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
Co-authored-by: JUN <jun@lidgeai.com>
)

* feat(gui): live quota updates for provider account lists

Add a per-browser "Live quota updates" setting (on by default, every 15
seconds, 5-600) that re-reads the per-account quota of the provider on
screen, so the bars move without pressing Refresh quotas.

A live update is the plain quota read, never refresh=1. The OAuth account
and API-key pool reads answer from per-credential TTL caches that also
hold failures, so a faster dashboard cannot make the proxy query a
provider more often. The summary strip and the Codex pool keep their fixed
cadence: a plain read of /api/provider-quotas or /api/codex-auth/accounts
can still reach upstream in some states.

A tick is skipped while the dashboard is hidden or while a read or account
mutation is in flight, shows no loading state, loses to any later quota
read, and drops a failure instead of replacing good bars.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(gui): state when live quota updates can reach a provider

The hint and the module comment said providers are not queried more
often. A plain quota read probes a credential again once its cache entry
has expired, so an open tab with live updates costs up to one probe per
credential per cache window. Say that in all locales and in the comments.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: seongwoong <seongwoong@mobilint.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…lidge-jun#8977)

* fix(update): accept dated preview versions with a publication attempt

Preview releases are published as X.Y.Z-preview.<date>.<attempt> since
2.100.5 (for example 2.100.6-preview.20261119.1). The registry lookup only
accepted a single numeric segment after -preview., so the preview channel
treated a valid answer as unreadable and the dashboard reported that it
could not read the latest version from npm. The version comparison had
the same limit, so an install on such a preview was never offered a newer
preview or the next stable release.

Accept the optional attempt segment in the lookup and compare previews by
date, then attempt; a version without an attempt sorts as attempt 0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(structure): record the dated preview version ordering

src/update/ is owned by structure/ops/service-and-sidecars.md; note the
accepted preview shapes and their base, number, attempt ordering.

---------

Co-authored-by: seongwoong <seongwoong@mobilint.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: JUN <jun@lidgeai.com>
* fix(link): verify recorded installations before probing

* test(link): bound Windows discovery spawns within the fixture deadline

* test(link): remove deferred Windows fixtures after child exit

* test(link): keep runtime-trust fixtures valid on macOS hosts

The fixture home now uses its canonical path. macOS tmpdir sits below the
/var symlink, which the trust gate resolves, so the stat stub keyed on the
unresolved path never matched and two foreign-owner cases ran the binary.

The trailing-newline symlink case runs on Linux only: BSD readlink omits the
appended newline when a target already ends in one, which the Linux-only gate
never meets. Ubuntu CI keeps exercising it.

---------

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
Co-authored-by: JUN <jun@lidgeai.com>
…n#9019)

* fix(claude): cache the GPT-6.2 system prompt on Codex login

* fix(claude): keep the GPT-6.2 prompt docs within budget and in every locale

Review follow-up for lidge-jun#9019. The placement paragraph moves from
structure/data-planes/inbound-compat.md (which it pushed to 606 of 600 lines) to
structure/providers/codex-installation-identity.md, an owner of
src/adapters/openai-responses/passthrough.ts. The es, fr, ja, ko, ru, tr, zh-cn and
zh-tw Claude Code guides get the same table rows as English: the GPT-6.2 Sol/Astra
system-prompt placement and messages[].role "system" translated to developer messages
in place. The endpoint test adds a GPT-6.2 request without a system prompt, which must
send no instructions and prepend nothing.

* docs(structure): end codex-installation-identity.md with a newline

---------

Co-authored-by: JUN <jun@lidgeai.com>
…un#8979)

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
…e-jun#9030)

The macOS CI jobs put Homebrew coreutils' gnubin first on PATH, so
Bun.which("stat") returned GNU stat and the Darwin branch of the BSD stat
stub ran `stat -f <format>`, which GNU reads as --file-system. The gate then
saw no path info and fell back. Call /usr/bin/stat, always the BSD stat on
macOS, so the case keeps exercising real BSD output on any PATH.
…8956)

* fix(claude): show Anthropic account verification guidance

* docs(claude): carry the account verification note into the Spanish guide

* fix(claude): accept only the portal link after the verification notice

Review follow-up for lidge-jun#8956. The Claude account-verification matcher accepted any text
after the fixed sentence, so a different diagnostic appended to it (an invalid key, say)
would have been shown as the Anthropic verification guidance. Only the portal link may
follow now; the unit test covers the link, an appended credential diagnostic and a
foreign link.

---------

Co-authored-by: JUN <jun@lidgeai.com>
…els (lidge-jun#8898)

* fix(codex): use confirmed roster capabilities for built-in native models

* fix(catalog): preserve per-model opt-in limits for roster windows

* fix(codex): retain the first duplicate native budget

Match incoming roster-budget selection to final first-row slug deduplication.
Keep unique-row retention, context-window rules and routed-row exclusions.
Cover both writers with lower and higher first-row budgets across repeated writes.

---------

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
Co-authored-by: JUN <jun@lidgeai.com>
…idge-jun#9017) (lidge-jun#9021)

* fix(combos): hop past a 413 that names a per-minute token cap

Groq refuses a turn above the account's tokens-per-minute tier with HTTP
413 and the structured code rate_limit_exceeded. That is this target's
cap, not a verdict on the request: another combo target with a larger
tier can serve the unchanged payload. decideComboFailure had no arm for
it, so the chain ended at the first target with a small tier even when
untried targets remained.

Hop on exactly that pair, the same way the free-tier per-request cap
already hops. Only the structured code counts, never the prose, and the
hard stops above it (499, origin_rejected, cyber, non-replayable codes,
a root that states its own terminal code) still win. Cooldown scope for
413 stays "none". A 413 without the code still stops, so the generic-413
invariant is unchanged.

Refs lidge-jun#9017

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(combos): hop past any provider 413, keep proxy-owned 413s terminal (lidge-jun#9017)

Coordinator decision on lidge-jun#9017 (2026-11-21): a provider HTTP 413 is that target's
intake limit. Combo targets carry different body and token limits and the provider
refused before processing the turn, so the combo now tries the next untried target
with cooldown "none", mirroring the per-target context-overflow hop. This subsumes
the narrower rate_limit_exceeded arm.

The proxy's own 413s stay terminal: translation_buffer_limit, inbound_body_too_large,
outbound_body_too_large and the exact Ollama late-attribution constant (moved to
src/adapters/ollama-late-attribution.ts so failover does not import the adapter).
Hard stops and terminal, safety or origin refusals still win; generic 410 is unchanged.

The "INVARIANT: generic 410 and 413 remain terminal" test is replaced with explicit
cases: provider 413 hops, each proxy-owned 413 stops, hard stops outrank a 413, the
last target's 413 reaches the client, and 410 still stops. structure/runtime.md, the
combos guide, streaming-health.md and the 260904 deferral record describe the reversal.

* fix(combos): recognize the proxy translator-budget 413 by its wording

adapter-dispatch formats the translator-budget refusal with type and code
request_too_large, so translation_buffer_limit never reached comboFailureDecision and
the new provider-413 hop would have sent that proxy-owned refusal to the next target.
The proxy's fixed wording ("... translation buffer exceeded the safe limit") always
survives, so it now marks the 413 as proxy-owned. The regression drives the real
formatter -> consumeComboFailure -> decision chain for every proxy-owned 413 and a
provider 413.

* fix(combos): keep post-send adapter buffer 413s terminal

Microsoft 365 Copilot raises HTTP 413 when its own answer, reasoning, message or frame
buffer overflows while collecting a reply, after ChatHub already ran the turn. The
provider-413 hop assumes a refusal before processing, so these must not reach another
target. The four messages move to src/adapters/m365-copilot/response-limits.ts, the
transport throws them from there, and failover treats them as proxy-owned. Its pre-send
image and request-size caps keep the hop. structure/runtime.md records the exception.

* docs(combos): carry the provider-413 paragraph into the Spanish guide

* fix(combos): judge the provider-413 hop on the whole body

CodeRabbit review on lidge-jun#9021. consumeComboFailure hands comboFailureDecision only the first
500 characters of a failure body, so a hard refusal such as bio_policy placed after the cut
left a provider 413 free to hop. The reader now records a whole-body intake verdict for
413 (isProviderIntakeRefusalBody), the combo loop passes it, and false vetoes the hop, as
providerModerationRefusal already does for 400/422. The 413 check also rejects hard-stop
tokens in any spelling except context_length_exceeded, which is still this target's limit.

The lidge-jun#9017 verdict tests move to tests/routing/combo-provider-413.test.ts (registered in
layout-combos.json and the expected layout) to keep the classification suite under the
file-size ratchet. The Spanish combos guide drops 413 from its streamed generic stops, and
both guides say streaming Responses clients get response.failed with
context_length_exceeded when every target refuses.

* fix(combos): let the whole-body 413 verdict close the size hops too

Follow-up to the whole-body intake verdict. The context-overflow hops read only the
500-character classification text, so a long plain-text 413 whose overflow wording sits in
the first 500 characters and whose terminal code sits after the cut still hopped. When the
reader's whole-body verdict is false, the provider-target overflow, definite overflow and
provider-413 hops are all skipped; hops for other reasons, such as a model-scoped refusal,
still apply (the Ollama conflicting-envelope case keeps dev's hop).

* fix(combos): close every size hop for a proxy-owned or terminal 413

Final-review finding on lidge-jun#9021. The streaming callers (combo stream preflight, Messages
native preflight) pass the event text and code without the whole-body verdict, so a 413
with code translation_buffer_limit and context-overflow wording still took the definite
overflow hop. The size-hop veto now also applies whenever the message and code show a
proxy-owned or terminal 413 (the same isProviderIntakeRefusal check), so the
provider-target overflow, definite overflow and provider-413 hops all stay closed for it,
on every transport. The new unit regression fails with 4526843's failover.ts; the
end-to-end proxy-owned case now runs on both transports with overflow wording too.

* fix(combos): pass the whole-event 413 verdict from the stream preflights

Final-review round 2 on lidge-jun#9021. The Responses stream preflight handed comboFailureDecision
only the selected error's message and code, so terminal evidence elsewhere in a 413 event
(for example details.code) did not close the size hops. It now passes
isProviderIntakeRefusalBody over the whole parsed event, as it already does for the
moderation verdict. The native Messages preflight passes the same verdict for parity; it
maps a request_too_large event to 502 (unchanged from dev), so the 413 rule does not
decide there. Regression: a 413 SSE frame with a terminal code in details stops, the same
frame without it hops; it fails with 12e4e49's preflight.

* fix(combos): keep a 413 terminal when its body was not read in full

CodeRabbit review on lidge-jun#9021. consumeComboFailure left the whole-body intake verdict
undefined when a 413 body exceeded the 64 KiB bounded read, failed mid-read or was
aborted, and undefined allowed the provider-413 hop: lost evidence could send the turn to
another target. The verdict now starts false for every 413 and becomes true only after
the complete body is read and judged, so those cases keep dev's terminal 413. Regressions
cover an oversized body and a stream that errors mid-read; they fail with the previous
reader.

The English and Spanish combos guides now say that an earlier confirmed HTTP 400 context
refusal still takes precedence over a final 413, and that an unreadable 413 body stops
the combo.

* fix(combos): judge the policy-route 413 hop on the complete body

CodeRabbit review on lidge-jun#9021. The policy fallback cleared the text to "" when a 413 body was
oversized, truncated or not display-safe, and called comboFailureDecision without a
whole-body verdict, so an unread 413 still opened the next policy candidate. It now
passes providerIntakeRefusal = complete && isProviderIntakeRefusalBody(text) for 413,
like the HTTP, stream and Messages readers. Regression in
tests/routing/routing-policy-fallback.test.ts: a readable provider 413 advances to the
next candidate, a 413 past the bounded read does not; the latter fails with the previous
policy-fallback.ts.

* fix(combos): keep a streamed 413 error's status through the preflight

Codex review on lidge-jun#9021. For a zero-output SSE error that states status 413, the log tap had
already recorded 400 (from an invalid_request_error type) or 429 (from
rate_limit_exceeded), and failedTerminalResponse preferred that recorded status, so the
outer combo decision saw 400 and stopped, or 429 and cooled the target, instead of taking
the provider-413 hop. An event that states 413 itself now keeps 413 in the projected
failure. Regression: both envelopes project 413 and the outer decision hops with cooldown
"none"; it fails with the previous preflight (400).

* fix(combos): judge failed 413 terminals on the whole frame in the stream preflight

Review on lidge-jun#9021 (CodeRabbit and Codex). A response.failed frame that states 413 never
reached the whole-event intake check, and the projected failure carries only the error
record, so a terminal sibling (a root code such as invalid_prompt, or metadata naming
origin_rejected) was dropped and the outer combo saw an ordinary provider 413. Such a frame
is now not retryable when its whole frame does not read as a provider intake refusal, and
the 413 projection itself requires that verdict. The projection also keeps 413 when a bare
error states it only as a numeric code. Regression: the two vetoed frames stop, the plain
one and the numeric-code event hop; it fails with the previous preflight.

* fix(combos): honor an inferred client cancellation before the 413 hop

Codex review on lidge-jun#9021. An uncoded 413 whose text says "Request canceled by client" is
classified as client_closed_request, but the intake check applied the cancellation codes
only to the raw code, so it hopped where dev stopped. The check now reads the classifier's
code for the text as well (the whole-body caller has none to pass). Regression: both
spellings stop, directly and through consumeComboFailure; a plain provider 413 still hops.
It fails with the previous failover.ts.

* ci: retrigger Cross-platform CI (no run was created for 26317a2)

* fix(combos): keep dev's stop for a 413 on routing-profile routes

Codex review on lidge-jun#9021. On a routing-profile route, core delivery has already replaced the
provider's 413 with the proxy's own context-overflow envelope (adapter-dispatch,
passthrough-delivery) before policy fallback decides, so the original body, including a
terminal code or an unreadable one, is gone and the small synthetic body read as a provider
intake refusal: the policy route hopped where dev stopped. The provider-413 hop is a combo
rule (lidge-jun#9017), so policy fallback now passes providerIntakeRefusal: false for 413 and keeps
dev's stop. Regression covers a readable provider 413, one past the bounded read, and the
real rewritten envelope; the first and last fail with the previous policy-fallback.ts.

* fix(combos): keep dev's stop for a native lane's rewritten 413

Codex review on lidge-jun#9021. Messages-native and Chat-native combo children hand
consumeComboFailure a rewritten envelope through comboFailureEvidence, which drops the
provider's code (an invalid_prompt, say) and turns an oversized original into a small
synthetic body, so the whole-body check read it as a provider intake refusal and the
combo hopped where dev stopped. A 413 judged from that rewritten evidence now keeps the
verdict false, so native lanes keep dev's terminal 413 until they carry the original
verdict. Regression: a rewritten 413 envelope stops; it fails with the previous reader.

* fix(combos): safety wording and sidecar envelopes keep a 413 terminal

Codex review on lidge-jun#9021. (1) A 413 with content_filter and safety-system wording ("rejected
by the safety system", "considered high risk") read as a provider intake refusal and
hopped where dev stopped; the intake check now applies the moderation classifier's
SAFETY_SYSTEM_WORDING veto too, on HTTP and zero-output SSE. (2) The web-search and
image-bridge loops reduce a provider failure to the proxy's own "Provider error 413"
envelope, so the original body (a terminal code, or an unreadable one) is gone;
consumeComboFailure keeps the verdict false for such an envelope, as it does for native
lanes. Regression covers both wordings on both carriers, both sidecar message forms, and a
plain provider 413 that still hops; it fails with the previous source.

* ci: retrigger Cross-platform CI (no run was created for dd12fd8)

* fix(combos): mark adapter-rewritten provider failures as not original evidence

Codex review on lidge-jun#9021. Vertex/Antigravity and Kiro replace a provider failure body with
display text (normalizeUpstreamHttpErrorResponse) before the combo reads it, so a 413
carrying a terminal code, or an unreadable body, reached consumeComboFailure as a small
summary that cleared the provider-413 check and hopped where dev stopped. The normalizer
now records the responses it rewrites (isRewrittenUpstreamError), and the combo failure
reader keeps the intake verdict false for them, so provenance comes from the rewriting
site rather than from each caller. Regression: a rewritten 413 stops; it fails with the
previous reader.

* fix(combos): keep the original read's verdict for an image-recovery retained 413

Codex review on lidge-jun#9021. With anthropicImageContextRecovery, retainAdapterFailureResponse
replaced the failed bounded read with a new response holding only its display-safe text,
and recovery can return that copy without retrying; an oversized or unreadable 413 became
an empty body that read as a provider intake refusal and hopped. The retained copy now
carries the rewritten-upstream marker whenever the original body was not read in full
(or was already rewritten), so the combo keeps dev's stop. A complete body keeps its own
verdict. Regression covers both; it fails with the previous image-context-recovery.ts.

* fix(combos): a run-turn adapter's 413 keeps dev's stop

Codex review on lidge-jun#9021. Run-turn adapters (Devin, Microsoft 365 Copilot and others) report a
provider failure as an event without its body, and run-turn execution builds the combo
failure from that event, so a 413 whose discarded body held a terminal code, or was
unreadable, read as a provider intake refusal and hopped. Both the streaming preflight and
the buffered path now mark a 413 they build as a rewritten upstream error, which
consumeComboFailure already keeps terminal. Regression in
tests/providers/m365-copilot-failover.test.ts: a run-turn 413 stays on the first combo
target, buffered and streamed; it fails with the previous run-turn-execution.ts.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: JUN <jun@lidgeai.com>
* ci: raise the Windows shard timeout to 40 minutes

Windows shards keep reaching the 30-minute wall with no failing test: on dev
067f623 shard 14/14 was cancelled at batch 39/46 in both attempts of run
44898495822, and runs 44809394399 and 44878221019 lost other shards the same
way. A cancelled shard is neither a pass nor a fail, so it blocks release
evidence without showing a fault.

Raise only platform-windows timeout-minutes to 40, as lidge-jun#8944 did for the Linux
shards, and pin the new ci.yml blob with an appended release-evidence policy
entry (the previous ci entry with only the ci.yml hash replaced).

* ci: keep ci.yml under the 2,000-line module cap

Shorten the new platform-windows timeout rationale to one line and re-pin the ci.yml blob in the release-evidence policy entry.
Preserve upstream release ancestry for numbered fork releases. Apply
confirmed native roster capabilities alongside the fork's account-scoped
Ultrafast and model discovery policy.

Keep fork attempt attribution, GUI log details, and release evidence
alongside upstream transport, dashboard, and test layout changes. Align
the package and desktop versions with the selected stable tag.

Signed-off-by: Bernardo Donadio <bcdonadio@bcdonadio.com>
@bcdonadio bcdonadio self-assigned this Nov 24, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T15:49:32.490512Z 834764c New commits
🔒 Security Review ✅ Completed 2026-11-24T15:52:32.121339Z 834764c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

✅ Deterministic PR hygiene checks passed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e6ba9a35d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/adapters/step-cli/conversation.ts Resolved
Track admitted turns in one shared conversation entry so finishing a
turn frees its slot while later turns remain queued. Keep the FIFO
promise tail and add a regression for admission during queue drain.

Signed-off-by: Bernardo Donadio <bcdonadio@bcdonadio.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 71cbf6f4e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/adapters/step-cli/session.ts Resolved
Notify the active turn when its protocol terminates so clients receive
one mapped error without waiting for the deadline. Keep pool eviction
bound to confirmed process cleanup.

Preserve the current tool hold when an unrelated result is rejected so
the caller can retry with the matching result.

Signed-off-by: Bernardo Donadio <bcdonadio@bcdonadio.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 59aebcdbe0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/adapters/step-cli/session-pool.ts Resolved
Comment thread src/adapters/step-cli/adapter.ts Resolved
Require a live owned session when a request carries continuation
evidence. Refuse expired context before opening a fresh child.

Only genuinely new user text can abandon a held call. An unrelated
result preserves the call for a matching retry.

Signed-off-by: Bernardo Donadio <bcdonadio@bcdonadio.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9c2a523103

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/adapters/step-cli/adapter.ts Resolved
Keep the held call available when a request mixes its result with a
new instruction. Tell callers to submit them separately so StepCode
does not silently discard the instruction.

Signed-off-by: Bernardo Donadio <bcdonadio@bcdonadio.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57c22f2347

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/adapters/step-cli/events.ts Resolved
Wait for query input-end acknowledgement or session cleanup before
admitting the next turn after completion or permission denial.

Keep one terminal error and make abort cleanup run even when the
interrupt fails. The pool keeps ownership of the cleanup receipt.

Signed-off-by: Bernardo Donadio <bcdonadio@bcdonadio.com>
@bcdonadio
bcdonadio merged commit 02e13c6 into custom Nov 24, 2026
17 of 21 checks passed
@bcdonadio
bcdonadio deleted the update/upstream-2.100.8 branch November 24, 2026 15:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 834764c12e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +195 to +200
if (type === "status" && (message.status === "turn_complete" || message.status === "done")) {
const usage = assistantUsage(session);
finishQuery(session, turn, turn.queryId, {
type: "done",
...(usage ? { usage } : {}),
stopReason: "stop",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject text-only completion when a tool call is required

When the caller sets tool_choice to required or a named tool and StepCode completes without invoking it, this branch reports a successful text-only response. buildStepSdkTools() computes requireToolCall, but the adapter never passes that constraint into the turn runtime or checks it before emitting done. The shared coding-agent runner rejects this same outcome with tool_call_required. Carry the requirement into the StepCode turn state and reject completion without the required call rather than silently violating the client's tool contract.

AGENTS.md reference: src/AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

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.