Repository navigation
Commit c9f4223
feat: default to Altimate Base with no consent gate; stop falling back to keyless Zen (#1361)
* feat: auto-register Altimate Base with no consent gate
Since 2026-09-17, OpenCode Zen rejects keyless traffic outright ("OpenCode's
free tier can only be used from within OpenCode"), which breaks every install
that falls back to the keyless `opencode` provider with no model of its own
(360 machines in 5 days). This registers Altimate Base automatically, with no
disclosure dialog, and stops the default-model resolvers from ever falling
back to the now-broken keyless tier when Base is available.
- `FreeTier.autoRegister()` / `autoRegisterWithin(ms)` in
`packages/opencode/src/altimate/free/client.ts`: registers without a
consent token, reusing the existing lock, `inflight` dedupe, and
`registerOnce` path `registerAfterConsent` already uses. Skips (never
throws) when `ALTIMATE_BASE_AUTO_REGISTER` is `0`/`false`, no gateway URL
is configured, the user explicitly logged out (checked inside the
registration lock so a concurrent logout can't be missed), or valid
credentials already exist. `autoRegisterWithin` bounds the wait and lets a
slow attempt keep going in the background — its credentials still land on
disk for the next launch.
- Every entrypoint (`cli/cmd/serve.ts`, `cli/cmd/tui.ts`, `cli/cmd/run.ts`
outside `--attach`, `cli/cmd/acp.ts`, `cli/cmd/web.ts`) calls
`FreeTier.autoRegisterWithin()` before provider/instance state is first
built.
- `Provider.isPublicZen()` is the one shared predicate for "this is the
keyless `opencode` tier" (id `opencode`, placeholder `"public"` key, no
real key). `Provider.defaultModel()`, ACP's `defaultModelFromConfig()`, and
the TUI's `fallbackModel()`/`currentModel()`/`restoreSession()` now:
- drop the `declinedManagedBaseDefault` veto (still parsed for
compatibility, no longer consulted) — there is no working public-Zen
fallback left for a decline to protect.
- exclude Base only via a real `enabled_providers`/`disabled_providers`
verdict, never merely because a project's `config.provider` block names
some other provider.
- replace a stale persisted/session selection that resolves to public Zen
with Base once it's registered, instead of replaying a model OpenCode
Zen now rejects outright (`prompt.ts`'s `lastModel()`, ACP's
`availableModel()`, and the TUI's recents/current-model/`restoreSession`
paths).
- ACP no longer strips `altimate-free` out of the directory snapshot for a
project with an unrelated `config.provider` block (`acp/service.ts`).
- `altimate_base_registration` telemetry gets an optional
`origin: "auto" | "consent"` field; the auto path tracks the event directly
instead of calling `Telemetry.init()` (which would treat config as enabled
outside an Instance context).
Part of a 3-commit PR; part (b) removes the TUI consent dialog and
capability/consent machinery, part (c) covers the Zen error message and
rate-limit retry. Both are separate, later work.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix: clear OpenCode Zen block message and retry Altimate Base TPM throttling
- `provider/error.ts`: map OpenCode Zen's "can only be used from within
OpenCode" 403 (keyless free tier, blocked since 2026-09-17) to a clear,
non-retryable message pointing users at Altimate Base or their own
provider via `/models`. Never auto-switches the model.
- `altimate/free/client.ts`'s `describeRateLimit`: a `throttling_error` with
"Limit type: tokens" is now retryable with the same message shape as the
generic burst limit, since the per-minute token budget was raised to
1.5M/min and now really means a burst of fast turns, not an oversized
request.
- `provider/error.ts`: cap the `Retry-After` header passed to
`session/retry.ts`'s existing retry machinery at 60s so a large
gateway-reported wait can't stall a session for minutes; the user-facing
message still shows the real value.
- Update `altimate-base-rate-limit-messages.test.ts`,
`altimate-base-harness-smoke.test.ts`, and
`release-v0.11.0-adversarial.test.ts` for the new TPM classification, and
add coverage for the Zen-block mapping, TPM retry classification, and the
60s Retry-After cap in `test/provider/error.test.ts`.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* refactor: remove the Altimate Base consent dialog and capability machinery
The product decision is fixed: no consent gate for Altimate Base. Replaces the
blocking terminal dialog with a one-line non-blocking notice, shown once per
install the first time Base becomes the active model. The disclosure wording
itself (`ALTIMATE_BASE_DISCLOSURE`) is unchanged — the gateway still logs
requests — but accepting it is no longer a precondition of registering.
- `FreeTier.register({ origin })` replaces `registerAfterConsent(token)`: no
token, still shares the lock/dedupe/`registerOnce` path with `autoRegister`.
Unlike `autoRegister`, an explicit register proceeds even after a logout —
the user asked for it.
- Deleted `altimate/free/capability.ts` (the one-shot arm/redeem consent
authority) and `altimate/free/host.ts` (the per-process registration-gate
injection it existed to protect) — nothing needs either any more.
- `altimate/free/consent.ts` keeps the `DISCLOSURE`/`HINT`/`disclosureHash()`
re-exports the notice and route still use; `createRegistrationConsentGate`
becomes `createRegistrationGate`, a plain outcome classifier with no token.
- `server.ts`: `POST /altimate/base/register` calls `FreeTier.register({
origin: "server" })` directly and accepts (but ignores)
`acceptedDisclosureSha256` for older clients. Both routes are now available
on every server with a gateway configured, not just one that provisioned a
gate — `serve.ts` no longer claims the armer or provides a gate at all.
- `cli/tui/worker.ts`'s `registerAltimateBase` RPC drops
`setAltimateBaseConsentToken` and the token param; `cli/cmd/tui.ts` no
longer mints one.
- TUI: deleted `DialogAltimateBaseConfirm`, `context/altimate-base-consent.tsx`
(the dedicated pre-SDK-context registration operation), and the startup
migration dialog trigger in `app.tsx`. Picking Altimate Base from any picker
(the welcome screen, the provider dialog, the full model catalogue) now
calls a shared `selectAltimateBase()` helper directly: register if needed →
refresh provider state → validate → select, showing a toast on failure. The
registration operation moves onto the public `sdk` context
(`AltimateBaseRegisterFn`) since there's no more consent boundary to keep it
out of; an attached TUI (no in-process worker) falls back to the HTTP route
over the same transport everything else uses.
- Telemetry: `altimate_base_registration`'s `origin` gains `"picker"` and
`"server"` (`"consent"` stays in the union for historical data). The retired
dialog's `altimate_base_confirm_shown` / `altimate_base_choice` /
`altimate_base_register_result` events keep their schema entries but are no
longer emitted by anything.
- Tests: deleted `altimate-base-armer-callsites.test.ts`,
`context/altimate-base-consent.test.tsx`, and
`cli/tui/dialog-altimate-base.test.tsx` (all tested deleted machinery).
Removed the token-forgery/capability-unforgeability tests from
`altimate-base.test.ts` and the token-redemption test from the
v0.11.1-adversarial suite; migrated every other `registerAfterConsent(
consented())` call site to `FreeTier.register({ origin: "picker" })`.
Rewrote `test/server/altimate-base-registration.test.ts` for the no-gate
routes (register works with no hash; browser-Origin is still refused on an
unsecured server).
Third and final commit of this PR; part (a) added no-consent auto-registration
and Base-over-keyless-Zen default selection, part (c) covers the Zen error
message and rate-limit retry.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* test: cover the no-dialog Altimate Base picker flow and the disclosure notice
Adds the two automated tests flagged as missing after the consent-dialog
removal — the user-visible promises of this PR:
- `test/component/select-altimate-base.test.ts`: unit-tests
`selectAltimateBase()` directly (with hand-built fakes for its
collaborators, since `selectModel()`'s underlying `local.model.set()` is
agent-scoped and the package's component-mount fixtures don't set one up).
Covers: a successful registration disposes the instance, refreshes provider
state, selects `altimate-free/altimate-base`, and never opens a dialog; the
same via the attached-TUI HTTP fallback (no host-injected
`registerAltimateBase`); a registration failure shows an error toast and
leaves the model/dialog untouched; and a registration that reports success
but never actually surfaces the model in the refreshed provider list also
fails closed with a toast, not a partial selection.
- `test/component/altimate-base-disclosure-notice.test.tsx`: mounts the real
provider stack with a single `altimate-free` provider (so `fallbackModel()`
resolves to Base with nothing else to configure) and drives
`useAltimateBaseDisclosureNotice()`'s kv-persisted "already shown" flag the
way a real restart would (a pre-seeded `kv.json`). Confirms the notice
shows exactly once — the first time Base becomes the active model — and
does not reappear on a subsequent launch once the flag is set.
Exported `ALTIMATE_BASE_DISCLOSURE_SHOWN_KEY` from `altimate-onboarding.tsx`
(previously module-local) so the second test can seed it, the same way
`ALTIMATE_BASE_MIGRATION_DECLINED_KEY` is already exported from
`context/local.tsx` for the identical reason.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix: Altimate Base fallback ordering and retry latch
Three Codex review findings on the Altimate Base default-no-consent branch:
- `fallbackModel()`'s implicit last-resort pick in `local.tsx` used a naive
array-order `.find()` instead of mirroring `Provider.defaultModel()`'s
ordering, so keyless public Zen could be picked over a registered Base, and
Base could beat a provider the user actually connected depending on array
position. Extracted `pickImplicitFallbackProvider()` as a pure, directly
testable function that mirrors the server's ordering exactly, and added 3
unit tests covering: Base outranking Zen, a credentialed provider
outranking Base, and unchanged behavior when Base isn't registered.
- `dialog-provider.tsx` and `dialog-model.tsx` set the Altimate Base row's
one-shot activation latch before the async `selectAltimateBase()` resolved,
and never reset it on failure, permanently bricking the row for the rest of
the dialog session after a single failed attempt. Reset the latch when
`selectAltimateBase()` returns `false`, and added a full-render retry test
confirming a failed selection can be retried and re-fires registration.
- `altimate-onboarding.tsx`'s `chooseAltimateBase()` had the same bug, but on
the first-run welcome picker: it returned `true` synchronously right after
firing the unawaited `selectAltimateBase()` call, so `activateRow()` claimed
its one-shot latch before the registration attempt was known to have
failed. A failed Base registration then bricked Enter, `/` and mouse-up for
the rest of the dialog session on the picker shown to users with no model
at all. Reset the latch on failure the same way, keeping the double-input
guard intact for the in-flight window, and added a retry test to
`dialog-model-welcome.test.tsx` confirming the same row can be retried.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix: repair unbalanced `altimate_change` markers and upstream branding in the Base default changes
- `server.ts`: restore the outer import block's `altimate_change end` that was removed together with the `FreeTierHost` import
- `acp.ts`: the auto-register import block used a single-line marker closed by an `end`; make it a `start`
- `provider.ts`: drop a nested `start` inside an already-marked block in `defaultModel()`
- `provider/error.ts`: the Zen rejection message and its matcher no longer name the upstream product; behavior unchanged (still scoped to the `opencode` provider)
- Reword two comments that the branding audit flagged
Fixes the Marker Guard and `bridge-merge` / `upstream-merge-guard` CI failures.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix: headless disclosure, persisted auto-register backoff, retry cap, dedupe and idempotent register
Finishes the backend half of the PR #1361 review findings:
- Headless disclosure (`run`/`serve`/`acp`/`web`): the first successful AUTO
registration outside the TUI now prints `ALTIMATE_BASE_DISCLOSURE` once to
stderr (`consent.ts`'s `printDisclosureOnceForHeadless()`), tracked with a
marker file next to the credential store so it survives across process
launches. `serve` skips it when `ALTIMATE_CLI_CLIENT=datamates`, since the
VS Code extension shows its own notice.
- Retry cap bypass (`provider/error.ts`): the 60s cap on a retryable Base
429's `Retry-After` only clamped a numeric `retry-after` in seconds.
`SessionRetry.delay()` reads `retry-after-ms` first and falls back to an
HTTP-date `retry-after` — both bypassed the cap entirely. All three forms
are now clamped, with 4 new tests.
- Idempotent register tearing down every instance (`server.ts`): the
`POST /altimate/base/register` route disposed every session/LSP/PTY/MCP
connection whenever `FreeTier.register()` reported success, even when the
credential on disk hadn't actually changed (its "already registered" fast
path). Compares `FreeTier.credentials()` before/after and skips disposal
when nothing changed, with 2 new tests.
- `SessionPrompt.lastModel()`: `FreeTier.isRegistered()` can throw (unreadable
store, bad config), which aborted resuming a session. Now best-effort —
falls through to the unchanged model on error.
- Shared in-flight dedupe (`free/client.ts`): `autoRegister()` and
`register()` used one dedupe map keyed only by gateway URL, so an explicit
`register()` racing an in-flight `autoRegister()` could observe autoRegister's
own "logged out" skip instead of actually reconnecting. Split into
`explicitInflight`/`autoInflight`, still serialized through the same
`Flock` lock, with a new race test.
- Repeated startup wait after a failure (`free/client.ts`): every entrypoint
calls `autoRegisterWithin()` at startup, so a persistent failure (network
down, gateway 429/5xx) repeated the same attempt on every new launch —
these are short-lived processes, so an in-process-only backoff map never
helped. The backoff deadline is now persisted to a small JSON file next to
the credential store, read at the start of `autoRegister()` (including the
first call in a brand-new process) and cleared on success; `register()`
ignores it. 3 new tests, including one asserting the backoff survives what
an in-memory map would have lost.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix: attached-TUI auth headers, explicit model authority, dismissed-picker guard
Finishes the TUI half of the PR #1361 review findings:
- Attached TUI registration drops auth (`altimate-onboarding.tsx`): the HTTP
fallback for `registerAltimateBase()` (used when there's no host-injected
worker RPC, i.e. `opencode attach`) called `sdk.fetch` directly with no
auth headers, so it 401ed against a password-protected server. `sdk.tsx`
now exposes the same `headers` `createOpencodeClient` already bakes into
every typed SDK call; the fallback merges them in. New test asserts the
Authorization header is actually sent.
- Explicit model must stay authoritative (`local.tsx`'s `currentModel()`):
the stale-public-Zen -> registered-Base substitution applied uniformly to
whatever `fallbackModel()`/a persisted pick/an agent's own `model` resolved
to — so an explicit `--model opencode/x` (or config `model`, or an agent's
configured `model`) pointing at the now-broken keyless Zen tier got
silently rewritten to Base instead of staying put. Split `fallbackModel()`'s
explicit args/config checks into their own `explicitFallbackModel()` memo
so `currentModel()` can route only the two truly implicit sources
(a persisted per-agent pick, and the implicit recents/allowlist fallback)
through the substitution. `Provider.defaultModel()`, ACP's
`defaultModelFromConfig()`, and `SessionPrompt.lastModel()` were already
correct (their explicit sources short-circuit before any substitution
logic runs) — verified, not changed. New full-mount test
(`explicit-model-authoritative.test.tsx`) exercises `currentModel()` itself
with Base actually registered, confirming `--model opencode/x` stays put
and — as a control — that the same catalogue substitutes Base when nothing
explicit overrides it.
- Dismissed picker (`selectAltimateBase()`): registration and bootstrap are
both async; if the originating picker was dismissed or replaced while
either was in flight, the function still went on to select the model and
call `dialog.clear()` — closing whatever the user has open now, not the
picker that started this. Snapshots the top-of-stack dialog by reference at
entry and re-checks it after every await, bailing out silently the moment
it no longer matches. 2 new tests (dismissed during registration, replaced
during bootstrap).
- Test isolation (`select-altimate-base.test.ts`): `selectAltimateBase()`
calls `markSetupComplete()` on every successful path, flipping the
module-global `setupComplete` signal that Bun's test runner shares across
every file in the run (already handled in `local.test.ts` around its own
`markSetupComplete()` calls, but missing here). Added the same
`resetSetupComplete()` in `afterEach`.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* docs: state the new Altimate Base auto-registration behavior
Every doc still promised the retired flow — "registration only after an
explicit confirmation that defaults to No" — after auto-registration with no
consent dialog shipped. Updates the security FAQ, quickstart, provider docs,
README, and network reference to state the new behavior (a fresh install
with no model of its own registers Altimate Base automatically, the
disclosure is shown once) and the actual opt-outs
(`ALTIMATE_BASE_AUTO_REGISTER=0`, `altimate providers logout altimate-base`,
`enabled_providers`/`disabled_providers`) — noting that only the env var
stops the background registration call itself.
`docs/docs/configure/providers.md` also drops the stale claim that
`declinedManagedBaseDefault` still keeps public Zen ahead of registered Base
for a migrating Big Pickle user — Zen's keyless tier rejects unauthenticated
traffic outright now, so there's no working choice left to honor; the flag
is read for backward compatibility only.
`docs/docs/reference/telemetry.md`: corrected `altimate_base_registration`'s
"after consent" wording, and marked `altimate_base_confirm_shown` /
`altimate_base_choice` / the `altimate_base_back` picker trigger as legacy —
still defined in the event schema, but no longer emitted now that the
consent dialog they recorded is gone.
Logging/retention wording is unchanged verbatim from `ALTIMATE_BASE_DISCLOSURE`
(verified against `test/altimate/altimate-base-disclosure-claims.test.ts`,
which checks the docs note stays a superset of the in-app notice).
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix: mark two lines the strict marker guard flagged as unmarked new code
`--base origin/main --strict` diffs against HEAD (not the working tree), so
this only surfaced after the previous two commits landed:
- `sdk.tsx`: the new `headers: props.headers,` line had its explanation on
the line above instead of a same-line marker, which the line-based checker
doesn't credit — moved to a start/end block ending on that line, matching
the sibling `registerAltimateBase` line's own trailing-marker style.
- `local.tsx`: `const fallbackModel = createMemo(() => {` is unchanged
content, but inserting `explicitFallbackModel()` above it shifted its diff
position enough that git shows it as a delete+add against origin/main
rather than pure context — flagged the same way. Added a marker comment.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix: mark remaining shifted line the strict marker guard flagged
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix: close the late-registration gaps and tidy review findings
- Headless disclosure: `printDisclosureOnceForHeadless` now prints whenever
Base is registered and the once-per-install marker is unclaimed, not only
when this launch's own registration finished. A registration that outlasted
the startup wait finished in the background and every later launch reported
"already registered", so the notice was never shown. The marker is claimed
with an exclusive create before printing, so concurrent launches print once.
- Register route: skip the process-wide reload only when the credential is
unchanged AND Base is already in this server's provider list. After a
background auto-registration (or a credential refreshed in place) the file
is unchanged but the cached provider state predates it.
- Move `isPublicZen` out of the `Provider` namespace into
`provider/public-zen.ts` (packages/opencode/AGENTS.md "Module shape").
- Restore `altimate_base_register_result` for picker registrations during
first-run onboarding (welcome picker `origin: "welcome"`, catalogue and
provider dialog `origin: "model"`), as the removed confirm component did.
- Cap the persisted 429 auto-register backoff at 24 hours, and serialise the
backoff record's read-modify-write under its own file lock.
- Docs: registration happens on every unregistered install, whether or not
the user has a model of their own; logout keeps automatic registration off
until Base is picked again; fleet audits look for `altimate-base.json`; the
`ALTIMATE_CLI_CLIENT=datamates` skip applies to `serve`; the registration
telemetry row covers the server route.
- Tests: route reload when Base is not loaded, backoff cap, headless
disclosure after a background registration, picker result callback; the
explicit-model test restores its env even if mounting fails.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: reload providers per process, not per workspace, and qualify the Base docs
- The register route skipped its reload whenever the requesting workspace
already listed Base. Caches in other directories, or in the `/api`
registry, could still predate a background registration. It now skips
only once this process has reloaded for that exact credential.
- The headless disclosure test isolates its home directory like the other
Base suites.
- Docs: the three-second startup wait and background completion, the retry
backoff, the auto-register skip conditions, what registration sends, and
the TUI notice appearing when Base first becomes active.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: treat a renewed Base credential as changed, and scope the backoff docs
- The register route's credential identity now includes the expiry. An
expired credential loads as absent, so a renewal that reissues the same
key and URL still reloads the provider caches.
- Docs: the retry backoff follows only network errors, rate limits and
gateway server errors.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: tell a credential reissued after logout from an untouched one
The register route's credential identity now also covers the rejected
flag and the logout nonce. Logout rotates the nonce, so a registration
that reissues the same key, URL and expiry after a logout in another
process still reloads the provider caches.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: return the logout nonce from a fresh Base registration
`registerOnce()` persisted the nonce but left it out of the returned
credentials, so callers saw a different identity than the stored one.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: serialize the register route's reload, and tighten the Base tests
- The register route runs its check-and-reload one call at a time, so
concurrent calls cannot both dispose the same live resources. Inside
that section it skips only when this process has already reloaded for
the credential now on disk, which makes the before/after read
unnecessary.
- Tests: a concurrent-register case; an ACP case where the model changes
between sessions; the picker's HTTP fallback asserts method and body;
the disclosure notice flushes its KV write before cleanup; the retry
case's name says it covers the re-fire only; the slow-registration test
releases its gate on failure; the error tests assert their type and the
budget message; a duplicate logout test is removed.
- Docs: drop the stale "consented" registration wording.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: keep Zen's variant off a restored Base session, and cycle past a repaired Zen pick
- Restoring a session whose model was keyless Zen selects Altimate Base
instead; the prompt now applies the saved variant only when the restored
model is the one that was saved, and clears it otherwise.
- `cycle()` resolves stale keyless-Zen entries in `recent` to Base the way
`currentModel()` does, so a repaired current model is found in the order
and cycling moves on instead of doing nothing. New test covers it.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: keep the rejected-to-restored reload, cycle off explicit Zen, and pin the concurrency test
- The register route reads the credential before registering again and
compares it inside the serialized section, so a rejected credential
restored with identical fields still reloads. New test covers it.
- `cycle()` keeps keyless-Zen entries as-is when the current model is an
explicit Zen pick, which `currentModel()` honors, so cycling can move
away from it. New test covers it.
- The concurrency test waits for both requests to pass registration and
for the first disposal to start before releasing it, instead of a
fixed sleep. It fails without the serialization.
- Test fixture: rename a mock provider to avoid a product-name leak.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: reload once when overlapping register calls repair the same credential
Each register request notes the reload count before its pre-registration
read. If a reload for the credential now on disk finished since then, it
already covers that read, so overlapping repairs of a rejected, expired or
logged-out credential reload once. A sequential restore still reloads.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: snapshot the reload count after the pre-registration read
A reload finishing while the read was in flight counted as covering it,
which could skip a reload a later rejection made necessary. Taking the
snapshot after the read errs toward one extra reload instead.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: capture the pre-registration read and reload count on the reload queue
Reading the credential and noting the reload count as one step on the same
serialized queue as the reloads means no reload can finish in between, so
the count says exactly which reloads followed the read: overlapping
repairs reload once and a stale read never skips a needed reload.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: honor an explicit keyless-Zen pick, and notice a late Base registration in the same launch
- The TUI records whether each agent's selection was explicit (`--model`,
picker, cycle, favorite). `currentModel()` repairs a stale keyless-Zen
selection to Base only when it was not explicit, e.g. a session restored
before Base existed, so an explicit Zen choice gets Zen's own error
instead of being routed to Base.
- `autoRegisterWithin()` takes an optional callback for a registration that
finishes after the startup wait gave up. `run`, `serve` (except for the
VS Code extension), `acp` and `web` use it to print the disclosure in the
same launch rather than the next.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: keep an explicit keyless-Zen pick across conversation switches
The TUI now remembers which models were explicitly picked during this
launch rather than flagging the agent's current selection, which session
restore reset. Both `currentModel()` and `restoreSession()` leave an
explicitly picked keyless-Zen model alone, so returning to a conversation
doesn't reroute it to Base. Tests pass model copies, because the store
merges a newly set object into the one already stored.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: carry an explicit keyless-Zen pick to an agent without its own model
An agent with no stored pick inherits the most recent one through
`fallbackModel()`, whose recents loop skipped a keyless-Zen entry without
checking this launch's explicit picks. The loop and the shared Zen repair
helper now both honor that record, so Tab to another agent keeps a
deliberate Zen choice. New test covers it.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* fix: key explicit picks unambiguously
Provider and model IDs can contain slashes, so joining them with one
could let two different picks share a key. Encode the pair as JSON.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016x3nbZU5Vb6HnSTqE7vELm
* test: pin autoRegisterWithin's late-notice callback wiring per entrypoint
Round-2 re-review NIT: nothing checked that run/acp/web always pass a real
onLateRegistration callback, or that serve does the same except when
serving the VS Code extension (ALTIMATE_CLI_CLIENT=datamates, which
renders its own notice). Source-assertion test, following the pattern in
test/branding/upstream-guard.test.ts — the CLI commands are Effect-based
and heavy to execute directly. Verified by mutation: dropping run.ts's
callback, and dropping serve.ts's datamates gate, each fail exactly one
assertion.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01H8gZMvZunXzx4LPSZzCafq
---------
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: ralphstodomingo <[email protected]>
Co-authored-by: Haider <[email protected]>1 parent a165057 commit c9f4223
62 files changed
Lines changed: 3731 additions & 2337 deletions
File tree
- docs/docs
- configure
- getting-started
- reference
- packages
- opencode
- src
- acp
- altimate
- free
- telemetry
- cli
- cmd
- tui
- provider
- server
- session
- test
- acp
- altimate
- _fixtures
- provider
- server
- skill
- tui
- src
- component
- prompt
- context
- test
- cli/tui
- component
- context
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
67 | 77 | | |
68 | 78 | | |
69 | 79 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
82 | 102 | | |
83 | 103 | | |
84 | 104 | | |
| |||
91 | 111 | | |
92 | 112 | | |
93 | 113 | | |
94 | | - | |
| 114 | + | |
95 | 115 | | |
96 | 116 | | |
97 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
21 | 31 | | |
22 | 32 | | |
23 | 33 | | |
| |||
110 | 120 | | |
111 | 121 | | |
112 | 122 | | |
113 | | - | |
| 123 | + | |
114 | 124 | | |
115 | 125 | | |
116 | 126 | | |
| |||
0 commit comments