feat: multi-account, quota, panel + reliability hardening - #13
Merged
makeittech merged 10 commits intoAug 24, 2026
Merged
Conversation
Meta requests (session title, context summary) force-disable thinking but still forwarded the selected effort level, and the API rejects that combination: 400 output_config.effort 'max' is not supported when thinking is disabled. The proxy no longer sends effort on meta requests, and startClaudeQuery drops effort defensively whenever the caller disables thinking, so no future call site can reintroduce the 400. Fixes #4 Co-authored-by: serkraser <serkraser@gmail.com>
On resumed turns the proxy ignored the host's prior messages entirely — history came from the Claude-side session transcript that resume points at, so plugins rewriting conversation history via experimental.chat.messages.transform (e.g. @tarquinen/opencode-dcp) had no effect on claude-code/* models after turn 2. The proxy now fingerprints the non-system messages of every turn (chain hash, persisted next to the session binding). When the incoming array is no longer an extension of what the host sent last turn — messages dropped, replaced, or edited — it logs a warning, abandons the Claude session, and rebuilds from the transformed host array via history transfer, so the transform actually reaches Claude. System messages stay excluded from the fingerprint: the proxy drops them deliberately (the Claude Code preset supplies the agent system prompt) and hosts vary them between turns. Knobs: - OPENCODE_CLAUDE_DIVERGENCE_REBUILD=0 downgrades divergence handling to warn-only (previous behavior: the Claude transcript wins). - OPENCODE_CLAUDE_HOST_TRANSCRIPT=1 opts into host-owned transcripts: never resume, rebuild from the host array every turn. Co-authored-by: serkraser <serkraser@gmail.com>
Document the divergence-rebuild behavior and the two new knobs (OPENCODE_CLAUDE_HOST_TRANSCRIPT, OPENCODE_CLAUDE_DIVERGENCE_REBUILD) in the README, and add changelog entries for both fixes. Co-authored-by: serkraser <serkraser@gmail.com>
…l title heuristic Co-authored-by: serkraser <serkraser@gmail.com>
… quota, identity and usage stores Co-authored-by: serkraser <serkraser@gmail.com>
…annel, meta local fallback Co-authored-by: serkraser <serkraser@gmail.com>
…ODE_CLAUDE_TOOLS=0 disables) Co-authored-by: serkraser <serkraser@gmail.com>
Co-authored-by: serkraser <serkraser@gmail.com>
… 529/$0 taxonomy, panel and tools Co-authored-by: serkraser <serkraser@gmail.com>
…axonomy Co-authored-by: serkraser <serkraser@gmail.com>
makeittech
marked this pull request as ready for review
August 24, 2026 12:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive reliability + PR #11 ideas reimplemented on post-#12 CLI-owned architecture.
Prior fixes (already in branch)
experimental.chat.messages.transformrespected on resume via divergence detectioneffort: maxwiththinking: disabled(fixes feat: cursor-style README, effort variants, images & compact #4)PR #11 ideas — reimplemented better (no plugin-side OAuth/tokens)
anthropic-ratelimit-unified-*headersrate_limit_eventmerge (zero token cost)accountInfofrom idle CLI probe control channelCLAUDE_CONFIG_DIRregistry (accounts.ts), threaded through SDK spawn/and/panel(panel.ts)claude_accounts,claude_account_manage(tools.ts)$0rate limit, local meta fallback, per-account rate-limit gateDeliberately NOT ported: loopback OAuth callback, plugin-side token exchange — violates CLI-owned auth model from #12.
Anthropic reliability hardening
New configuration
OPENCODE_CLAUDE_ACCOUNTS,OPENCODE_CLAUDE_MODEL_QUOTA=0,OPENCODE_CLAUDE_PANEL=0,OPENCODE_CLAUDE_PANEL_HOST,OPENCODE_CLAUDE_TOOLS=0/accounts,/quota,/usage,/sessions, panel routessonnet@work, headerx-opencode-claude-accountTest plan
bun installnpm run buildbun test/smoke.ts— multi-account E2E, quota stores, 529/$0 taxonomy, panel + tools, divergence detection