Skip to content

chore: VALIDATION Integration branch that SHOULD BE a UNION of fix/* and feature/* branches - #7

Closed
zeroaltitude wants to merge 127 commits into
mainfrom
integration-feb-2026
Closed

zeroaltitude wants to merge 127 commits into
mainfrom
integration-feb-2026

Conversation

@zeroaltitude

@zeroaltitude zeroaltitude commented Feb 28, 2026 •

Copy link
Copy Markdown
Owner

As per title only

Enrich every browser action response with the resolved page URL so
downstream consumers (security plugins, audit loggers) know which page
was targeted without a separate tabs query.

- Add shared withRouteTabContext URL enrichment wrapper (agent.shared.ts)
- Resolve live URL via Playwright, fall back to tab list URL
- Include url field in browser-tool console message results
- Push URL changes from Chrome extension background script

Co-authored-by: Eddie Abrams <[email protected]>
When a channel config has top-level tokens (botToken/appToken/token)
AND named accounts in the accounts section, listAccountIds() omitted
the default account. This meant only named accounts started, leaving
the base-config bot disconnected.

Now detects base-level tokens and includes 'default' alongside named
accounts so both providers start.

Includes 3 test cases: base tokens present, default already in accounts
(no duplicate), and no base tokens (unchanged behavior).

Co-authored-by: Eddie Abrams <[email protected]>
@zeroaltitude zeroaltitude changed the title Integration feb 2026 chore: VALIDATION Integration branch that SHOULD BE a UNION of fix/* and feature/* branches Mar 1, 2026
Address two review findings on the browser URL enrichment:

1. withRouteTabContext now only fills in url when the handler didn't
   already set one (record.url === undefined). This prevents clobbering
   post-navigation URLs returned by /navigate and similar handlers.

2. Chrome extension tabs.onUpdated listener now falls back to
   chrome.tabs.get() for the current title when changeInfo.title is
   undefined (URL-only changes), preventing relay cache title wipes.
…d injection

Remove redundant url: tab.url and targetId: tab.targetId from
individual action/debug route responses. The withRouteTabContext
wrapper already resolves the live Playwright URL and injects both
fields into any response where they're missing. Hardcoding tab.url
in handlers prevented the wrapper from correcting stale relay
metadata — the exact scenario it was designed to fix.

Addresses Codex review on openclaw#30323.
@zeroaltitude
zeroaltitude force-pushed the integration-feb-2026 branch from 163e124 to 8a80a93 Compare March 1, 2026 05:57
zeroaltitude pushed a commit that referenced this pull request Mar 2, 2026
… and docs (openclaw#16761)

Add inline file attachment support for sessions_spawn (subagent runtime only):

- Schema: attachments[] (name, content, encoding, mimeType) and attachAs.mountPath hint
- Materialization: files written to .openclaw/attachments/<uuid>/ with manifest.json
- Validation: strict base64 decode, filename checks, size limits, duplicate detection
- Transcript redaction: sanitizeToolCallInputs redacts attachment content from persisted transcripts
- Lifecycle cleanup: safeRemoveAttachmentsDir with symlink-safe path containment check
- Config: tools.sessions_spawn.attachments (enabled, maxFiles, maxFileBytes, maxTotalBytes, retainOnSessionKeep)
- Registry: attachmentsDir/attachmentsRootDir/retainAttachmentsOnKeep on SubagentRunRecord
- ACP rejection: attachments rejected for runtime=acp with clear error message
- Docs: updated tools/index.md, concepts/session-tool.md, configuration-reference.md
- Tests: 85 new/updated tests across 5 test files

Fixes:
- Guard fs.rm in materialization catch block with try/catch (review concern #1)
- Remove unreachable fallback in safeRemoveAttachmentsDir (review concern #7)
- Move attachment cleanup out of retry path to avoid timing issues with announce loop

Co-authored-by: Tyler Yust <[email protected]>
Co-authored-by: napetrov <[email protected]>
@zeroaltitude
zeroaltitude force-pushed the integration-feb-2026 branch 3 times, most recently from 082b08b to 8afa9b8 Compare March 2, 2026 22:01
@zeroaltitude
zeroaltitude force-pushed the integration-feb-2026 branch from 8afa9b8 to dc00c90 Compare March 3, 2026 16:30
…undant preflight lookup; guard relay send

- Move URL enrichment to after handler run() so navigating actions
  (/act, /navigate) report post-action URL, not pre-run snapshot
- Remove pre-run Playwright page lookup that doubled CDP latency
- Wrap sendToRelay in tabs.onUpdated with try/catch for WebSocket flaps

Addresses review feedback from codex-connector on PR openclaw#30323.
…erit base tokens

- Don't inject 'default' when all named accounts lack per-account
  auth overrides (they'd use the same base credentials, causing
  duplicate provider connections and event processing)
- Use normalizeAccountId for case-insensitive default detection
- Applies to Slack (botToken/appToken) and Discord (token) alike

Addresses review feedback from codex-connector on PR openclaw#30310.
@zeroaltitude
zeroaltitude force-pushed the integration-feb-2026 branch from dc00c90 to b3ddf8d Compare March 3, 2026 16:46
…okens

Mixed configs (some accounts with own tokens, some inheriting base)
would still duplicate credentials between default and inheriting
accounts. Now requires every named account to carry per-account auth
before injecting default.

Addresses codex-connector P1 on PR openclaw#30310.
…ontext

The intercepted res.json was not restored on exceptions from run(),
causing handleRouteError -> jsonError to hit the buffer interceptor
instead of actually sending the error response. This could leave
HTTP requests hanging on any Playwright failure in tab-targeting routes.

Addresses codex-connector P1 on PR openclaw#30323.
@zeroaltitude
zeroaltitude force-pushed the integration-feb-2026 branch from b3ddf8d to 02e582d Compare March 4, 2026 03:17
The in-memory thread participation cache was lost on gateway restart,
causing the bot to stop responding to non-@mention messages in threads
it had previously participated in.

Now persists to $STATE_DIR/slack-thread-participation.json with:
- Lazy load on first access (no startup cost)
- Debounced writes (at most every 5s, unref'd timer)
- TTL filtering on load (expired entries discarded)
- Graceful handling of missing/corrupt files

Adds 4 persistence tests alongside existing 8 unit tests.
@zeroaltitude
zeroaltitude force-pushed the integration-feb-2026 branch from 02e582d to 91309d9 Compare March 4, 2026 03:23
@zeroaltitude
zeroaltitude force-pushed the integration-feb-2026 branch from 91309d9 to 04370de Compare March 4, 2026 03:32
…kage

Addresses greptile review — the old afterEach left loaded=true, so the
first test could read from the real state dir on machines with live data.
@zeroaltitude
zeroaltitude force-pushed the integration-feb-2026 branch from 04370de to ef66c19 Compare March 4, 2026 03:38
…gent context

Enrich PluginHookAgentContext with security-relevant sender identity
fields that enable plugins to make trust decisions based on who
triggered an agent run:

- sourceProvider: original message source before channel routing
- senderId: platform-specific sender ID (Discord, Slack, etc.)
- senderName: sender's display name
- senderIsOwner: whether sender is a configured owner
- groupId: group/channel ID for group chats (null for DMs)
- spawnedBy: parent session key for sub-agent sessions

Also adds sessionKey to PluginHookMessageContext for message hooks.

Consolidates inline hook context objects in attempt.ts to use a
single hookCtx variable, ensuring all hook call sites receive the
full identity context consistently.

These fields are consumed by security plugins like openclaw-provenance
for taint classification and trust-level assignment. Follows the
pattern established in openclaw#28623 (trigger/channelId) and openclaw#26394
(sessionKey for session hooks).

[claude, human developer oversight]
…ility hooks

Three new void/parallel plugin hooks for agent loop observability:

- context_assembled: fires when the full context (system prompt +
  messages) is assembled before the first LLM call. Gives plugins
  a census of what the model will see.
- loop_iteration_start: fires at the start of each agent loop
  iteration. Enables recursion depth tracking.
- loop_iteration_end: fires at the end of each iteration with
  tool call count and whether the loop will continue.

All three are fire-and-forget (void return, parallel execution),
making them zero-impact on the critical path. No existing hooks
cover these observation points — context_assembled and loop
iteration tracking have zero overlap with current hook surface.

Wired into the embedded runner via event subscription for iteration
hooks and inline call for context_assembled.

9 unit tests covering event shape, parallel execution, and no-op
when no handlers are registered.

[claude, human developer oversight]
…indows CI

writeFileWithinRoot creates parent dirs for relative paths but the
test uses an absolute path. Windows CI doesn't have the quarantine/
directory pre-created, causing ENOENT.
clearAllAssistantContent now sets array content to [] instead of
only clearing text parts. Prevents sensitive data in tool_use input
arguments from persisting in session history when a response is
blocked by before_response_emit.
… symlink

Replaces parent-dir-only realpath with recursive ancestor walk that
finds the nearest existing directory and resolves symlinks from there.
Fixes false outside-workspace rejections on macOS where /tmp symlinks
to /private/tmp and redirect parent dirs don't exist yet.

Also documents intentional workspace-root write scope for redirects.
- Removed dangling JSDoc comment from pre-refactor getRecentSessionContent
- Empty-string test now asserts content is '' (not just absence of data)
- New test: sessionSaveContent + sessionSaveRedirectPath combo coverage
  (23 tests total)
…tric error handling

Non-redirect writes now use memory/ as containment root instead of
workspace/, preventing a misbehaving slug generator from writing
outside memory/. Added dedicated try/catch with SafeOpenError
handling for non-redirect path, matching redirect error handling.
…ors, guard gate clear

1. Test comment: 'h2 overrides' → clarifies h1 never blocked (not a latch scenario)
2. Cross-lock: added NOTE for plugin authors about silent drop behavior
3. Gate clear: guarded by hasHooks('after_llm_call') to avoid no-op on before_llm_call-only
Resolved conflicts in attempt.ts, hooks.ts, and types.ts by
combining loop_iteration/context_assembled hooks from
feat/hook-context-assembled-loop-iteration with before_llm_call/
after_llm_call/before_response_emit hooks from this branch.
Added identity context fields from feat/hook-agent-identity-context.
@zeroaltitude
zeroaltitude force-pushed the integration-feb-2026 branch from a9307ed to 0163500 Compare March 6, 2026 00:01
zeroaltitude pushed a commit that referenced this pull request Apr 2, 2026
* feat: add QQ Bot channel extension

* fix(qqbot): add setupWizard to runtime plugin for onboard re-entry

* fix: fix review

* fix: fix review

* chore: sync lockfile and config-docs baseline for qqbot extension

* refactor: 移除图床服务器相关代码

* fix

* docs: 新增 QQ Bot 插件文档并修正链接路径

* refactor: remove credential backup functionality and update setup logic

- Deleted the credential backup module to streamline the codebase.
- Updated the setup surface to handle client secrets more robustly, allowing for configured secret inputs.
- Simplified slash commands by removing unused hot upgrade compatibility checks and related functions.
- Adjusted types to use SecretInput for client secrets in QQBot configuration.
- Modified bundled plugin metadata to allow additional properties in the config schema.

* feat: 添加本地媒体路径解析功能,修正 QQBot 媒体路径处理

* feat: 添加本地媒体路径解析功能,修正 QQBot 媒体路径处理

* feat: remove qqbot-media and qqbot-remind skills, add tests for config and setup

- Deleted the qqbot-media and qqbot-remind skills documentation files.
- Added unit tests for qqbot configuration and setup processes, ensuring proper handling of SecretRef-backed credentials and account configurations.
- Implemented tests for local media path remapping, verifying correct resolution of media file paths.
- Removed obsolete channel and remind tools, streamlining the codebase.

* feat: 更新 QQBot 配置模式,添加音频格式和账户定义

* feat: 添加 QQBot 频道管理和定时提醒技能,更新媒体路径解析功能

* fix

* feat: 添加 /bot-upgrade 指令以查看 QQBot 插件升级指引

* feat: update reminder and qq channel skills

* feat: 更新remind工具投递目标地址格式

* feat: Refactor QQBot payload handling and improve code documentation

- Simplified and clarified the structure of payload interfaces for Cron reminders and media messages.
- Enhanced the parsing function to provide clearer error messages and improved validation.
- Updated platform utility functions for better cross-platform compatibility and clearer documentation.
- Improved text parsing utilities for better readability and consistency in emoji representation.
- Optimized upload cache management with clearer comments and reduced redundancy.
- Integrated QQBot plugin into the bundled channel plugins and updated metadata for installation.

* OK apps/macos/Sources/OpenClaw/HostEnvSecurityPolicy.generated.swift

> [email protected] check:bundled-channel-config-metadata /Users/yuehuali/code/PR/openclaw
> node --import tsx scripts/generate-bundled-channel-config-metadata.ts --check

[bundled-channel-config-metadata] stale generated output at src/config/bundled-channel-config-metadata.generated.ts
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Command failed with exit code 1.

* feat: 添加 QQBot 渠道配置及相关账户设置

* fix(qqbot): resolve 14 high-priority bugs from PR openclaw#52986 review

DM routing (7 fixes):
- #1: DM slash-command replies use sendDmMessage(guildId) instead of sendC2CMessage(senderId)
- #2: DM qualifiedTarget uses qqbot:dm:${guildId} instead of qqbot:c2c:${senderId}
- #3: sendTextChunks adds DM branch
- #4: sendMarkdownReply adds DM branch for text and Base64 images
- #5: parseAndSendMediaTags maps DM to targetType:dm + guildId
- #6: sendTextToTarget DM branch uses sendDmMessage; MessageTarget adds guildId field
- #7: handleImage/Audio/Video/FilePayload add DM branches

Other high-priority fixes:
- #8: Fix sendC2CVoiceMessage/sendGroupVoiceMessage parameter misalignment
- #9: broadcastMessage uses groupOpenid instead of member_openid for group users
- #10: Unify KnownUser storage - proactive.ts delegates to known-users.ts
- #11: Remove invalid recordKnownUser calls for guild/DM users
- #12: sendGroupMessage uses sendAndNotify to trigger onMessageSent hook
- #13: sendPhoto channel unsupported returns error field
- #14: sendTextAfterMedia adds channel and dm branches

Type fixes:
- DeliverEventContext adds guildId field
- MediaTargetContext.targetType adds dm variant
- sendPlainTextReply imgMediaTarget adds DM branch

* fix(qqbot): resolve 2 blockers + 7 medium-priority bugs from PR openclaw#52986 review

Blocker-1: Remove unused dmPolicy config knob
- dmPolicy was declared in schema/types/plugin.json but never consumed at runtime
- Removed from config-schema.ts, types.ts, and openclaw.plugin.json
- allowFrom remains active (already wired into framework command-auth)

Blocker-2: Gate sensitive slash commands with allowFrom authorization
- SlashCommand interface adds requireAuth?: boolean
- SlashCommandContext adds commandAuthorized: boolean
- /bot-logs set to requireAuth: true (reads local log files)
- matchSlashCommand rejects unauthorized senders for requireAuth commands
- trySlashCommandOrEnqueue computes commandAuthorized from allowFrom config

Medium-priority fixes:
- #15: Strip non-HTTP/non-local markdown image tags to prevent path leakage
- #16: applyQQBotAccountConfig clears clientSecret when setting clientSecretFile and vice versa
- #17: getAdminMarkerFile sanitizes accountId to prevent path traversal
- #18: URGENT_COMMANDS uses exact match instead of startsWith prefix match
- #19: isCronExpression validates each token starts with a cron-valid character
- #20: --token format validation rejects malformed input without colon separator
- #21: resolveDefaultQQBotAccountId checks QQBOT_APP_ID environment variable

* test(qqbot): add focused tests for slash command authorization path

- Unauthorized sender rejected for /bot-logs (requireAuth: true)
- Authorized sender allowed for /bot-logs
- Non-requireAuth commands (/bot-ping, /bot-help, /bot-version) work for all senders
- Unknown slash commands return null (passthrough)
- Non-slash messages return null
- Usage query (/bot-logs ?) also gated by auth check

* fix(qqbot): align global TTS fallback with framework config resolution

- Extract isGlobalTTSAvailable to utils/audio-convert.ts, mirroring core
  resolveTtsConfig logic: check auto !== 'off', fall back to legacy
  enabled boolean, default to off when neither is set.
- Add pre-check in reply-dispatcher before calling globalTextToSpeech to
  avoid unnecessary TTS calls and noisy error logs when TTS is not
  configured.
- Remove inline as any casts; use OpenClawConfig type throughout.
- Refactor handleAudioPayload into flat early-return structure with
  unified send path (plugin TTS → global fallback → send).

* fix(qqbot): break ESM circular dependency causing multi-account startup crash

The bundled gateway chunk had a circular static import on the channel
chunk (gateway -> outbound-deliver -> channel, while channel dynamically
imports gateway). When two accounts start concurrently via Promise.all,
the first dynamic import triggers module graph evaluation; the circular
reference causes api exports (including runDiagnostics) to resolve as
undefined before the module finishes evaluating.

Fix: extract chunkText and TEXT_CHUNK_LIMIT from channel.ts into a new
text-utils.ts leaf module. outbound-deliver.ts now imports from
text-utils.ts, breaking the cycle. channel.ts re-exports for backward
compatibility.

* fix(qqbot): serialize gateway module import to prevent multi-account startup race

When multiple accounts start concurrently via Promise.all, each calls
await import('./gateway.js') independently. Due to ESM circular
dependencies in the bundled output, the first import can resolve
transitive exports as undefined before module evaluation completes.

Fix: cache the dynamic import promise in a module-level variable so all
concurrent startAccount calls share the same import, ensuring the
gateway module is fully evaluated before any account uses it.

* refactor(qqbot): remove startup greeting logic

Remove getStartupGreetingPlan and related startup greeting delivery:
- Delete startup-greeting.ts (greeting plan, marker persistence)
- Delete admin-resolver.ts (admin resolution, greeting dispatch)
- Remove startup greeting calls from gateway READY/RESUMED handlers
- Remove isFirstReadyGlobal flag and adminCtx

* fix(qqbot): skip octal escape decoding for Windows local paths

Windows paths like C:\Users\1\file.txt contain backslash-digit sequences
that were incorrectly matched as octal escape sequences and decoded,
corrupting the file path. Detect Windows local paths (drive letter or UNC
prefix) and skip the octal decoding step for them.

* fix bot issue

* feat: 支持 TTS 自动开关并清理配置中的 clientSecretFile

* docs: 添加 QQBot 配置和消息处理的设计说明

* rebase

* fix(qqbot): align slash-command auth with shared command-auth model

Route requireAuth:true slash commands (e.g. /bot-logs) through the
framework's api.registerCommand() so resolveCommandAuthorization()
applies commands.allowFrom.qqbot precedence and qqbot: prefix
normalization before any handler runs.

- slash-commands.ts: registerCommand() now auto-routes by requireAuth
  into two maps (commands / frameworkCommands); getFrameworkCommands()
  exports the auth-required set for framework registration; bot-help
  lists both maps
- index.ts: registerFull() iterates getFrameworkCommands() and calls
  api.registerCommand() for each; handler derives msgType from ctx.from,
  sends file attachments via sendDocument, supports multi-account via
  ctx.accountId
- gateway.ts (inbound): replace raw allowFrom string comparison with
  qqbotPlugin.config.formatAllowFrom() to strip qqbot: prefix and
  uppercase before matching event.senderId
- gateway.ts (pre-dispatch): remove stale auth computation; commandAuthorized
  is true (requireAuth:true commands never reach matchSlashCommand)
- command-auth.test.ts: add regression tests for qqbot: prefix
  normalization in the inbound commandAuthorized computation
- slash-commands.test.ts: update /bot-logs tests to expect null
  (command routed to framework, not in local registry)

* rebase and solve conflict

* fix(qqbot): preserve mixed env setup credentials

---------

Co-authored-by: yuehuali <[email protected]>
Co-authored-by: walli <[email protected]>
Co-authored-by: WideLee <[email protected]>
Co-authored-by: Frank Yang <[email protected]>
zeroaltitude added a commit that referenced this pull request May 21, 2026
… provenance footer parity

Tank-#7 / live finding: provenance footers weren't attaching to Tabitha's
claude replies even though message_sending was firing. Root cause: my
run-attempt never called runAgentHarnessAgentEndHook, so the provenance
plugin's agent_end → finalTaintBySession bookkeeping never populated.
When the auto-reply dispatcher then fired message_sending, provenance
had no taint snapshot to footer the payload with, so it silently passed
the text through unchanged.

Codex fires both hooks (codex/run-attempt.ts:2686 + :2704). Mirroring:
 - runAgentHarnessLlmOutputHook on resolved-ref + provider/model +
   harnessId + assistantTexts + lastAssistant. Sets harnessId to
   "claude-app-server" when the runtime plan doesn't supply one.
 - runAgentHarnessAgentEndHook on messagesSnapshot + success +
   error + durationMs.

Both fire-and-forget exactly like codex's call sites. Hook ctx mirrors
codex's: runId/agentId/sessionKey (sandboxSessionKey)/sessionId/
workspaceDir/messageProvider/trigger/channelId. Added attemptStartedAt
capture at runAttempt entry for the durationMs field.

Type-check (tsgo:extensions) clean.
zeroaltitude added a commit that referenced this pull request May 21, 2026
… provenance footer parity

Tank-#7 / live finding: provenance footers weren't attaching to Tabitha's
claude replies even though message_sending was firing. Root cause: my
run-attempt never called runAgentHarnessAgentEndHook, so the provenance
plugin's agent_end → finalTaintBySession bookkeeping never populated.
When the auto-reply dispatcher then fired message_sending, provenance
had no taint snapshot to footer the payload with, so it silently passed
the text through unchanged.

Codex fires both hooks (codex/run-attempt.ts:2686 + :2704). Mirroring:
 - runAgentHarnessLlmOutputHook on resolved-ref + provider/model +
   harnessId + assistantTexts + lastAssistant. Sets harnessId to
   "claude-app-server" when the runtime plan doesn't supply one.
 - runAgentHarnessAgentEndHook on messagesSnapshot + success +
   error + durationMs.

Both fire-and-forget exactly like codex's call sites. Hook ctx mirrors
codex's: runId/agentId/sessionKey (sandboxSessionKey)/sessionId/
workspaceDir/messageProvider/trigger/channelId. Added attemptStartedAt
capture at runAttempt entry for the durationMs field.

Type-check (tsgo:extensions) clean.
zeroaltitude added a commit that referenced this pull request May 21, 2026
…ng) + P2 (replayMetadata side effects)

Tank's 2026-05-21 seventh-round static review surfaced two real
correctness issues.

P1 — concurrent turn cross-routing on the shared client. The shared
ClaudeAppServerClient dispatches server requests to per-turn handlers
by registration order, and the handlers didn't filter on threadId or
turnId. Two Claude turns running concurrently (e.g. one Discord +
one Slack at the same time) could route the second turn's
item/tool/call or item/commandExecution/requestApproval to the FIRST
turn's bridge — wrong sessionKey, channel, cwd, policy context.

Fix mirrors codex's isCurrentThreadTurnRequestParams /
isCurrentApprovalTurnRequestParams pattern: each runAttempt now holds a
mutable turnIdentity = { threadId?, turnId? } ref. Both
registerToolCallHandler and registerApprovalHandler take this ref and
filter incoming requests: if the request's params.threadId or
params.turnId is set and doesn't match the bound identity, return
undefined so the next handler in the chain tries. turnIdentity is
populated late — threadId in step 6 (after ensureThread), turnId in
step 7 (after turn/start) — because that's the natural data flow. A
request that arrives before the threadId is bound also returns
undefined to avoid claiming requests intended for other turns.

P2 — replayMetadata was hardcoded {hadPotentialSideEffects:false,
replaySafe:true}. If a messaging-tool send fired during the turn we
already pushed an external Discord/Slack message, so the turn is
emphatically NOT replay-safe. Now: when bridge.telemetry
.didSendViaMessagingTool is true, set replayMetadata to
{hadPotentialSideEffects:true, replaySafe:false}. Mirrors codex's
posture (and the user's clear intent — a duplicate Discord message on
replay would be a real failure mode).

Type-check (tsgo:extensions) clean. Remaining Tank-#7 findings
(transcript loss on non-cwd rotations, plugin npm dep declaration,
statePath ignored) coming in follow-up commits.
zeroaltitude added a commit that referenced this pull request May 21, 2026
…ng) + P2 (replayMetadata side effects)

Tank's 2026-05-21 seventh-round static review surfaced two real
correctness issues.

P1 — concurrent turn cross-routing on the shared client. The shared
ClaudeAppServerClient dispatches server requests to per-turn handlers
by registration order, and the handlers didn't filter on threadId or
turnId. Two Claude turns running concurrently (e.g. one Discord +
one Slack at the same time) could route the second turn's
item/tool/call or item/commandExecution/requestApproval to the FIRST
turn's bridge — wrong sessionKey, channel, cwd, policy context.

Fix mirrors codex's isCurrentThreadTurnRequestParams /
isCurrentApprovalTurnRequestParams pattern: each runAttempt now holds a
mutable turnIdentity = { threadId?, turnId? } ref. Both
registerToolCallHandler and registerApprovalHandler take this ref and
filter incoming requests: if the request's params.threadId or
params.turnId is set and doesn't match the bound identity, return
undefined so the next handler in the chain tries. turnIdentity is
populated late — threadId in step 6 (after ensureThread), turnId in
step 7 (after turn/start) — because that's the natural data flow. A
request that arrives before the threadId is bound also returns
undefined to avoid claiming requests intended for other turns.

P2 — replayMetadata was hardcoded {hadPotentialSideEffects:false,
replaySafe:true}. If a messaging-tool send fired during the turn we
already pushed an external Discord/Slack message, so the turn is
emphatically NOT replay-safe. Now: when bridge.telemetry
.didSendViaMessagingTool is true, set replayMetadata to
{hadPotentialSideEffects:true, replaySafe:false}. Mirrors codex's
posture (and the user's clear intent — a duplicate Discord message on
replay would be a real failure mode).

Type-check (tsgo:extensions) clean. Remaining Tank-#7 findings
(transcript loss on non-cwd rotations, plugin npm dep declaration,
statePath ignored) coming in follow-up commits.
zeroaltitude added a commit that referenced this pull request May 21, 2026
…tations) + P3 (statePath cleanup)

Tank-#7 P2 — approvalPolicy and developerInstructions rotations were
still calling thread/start and therefore still eating the SDK
conversation transcript, despite the cwd-via-resume fix. Same fix
pattern as cwd: send the divergent fields on thread/resume, the server's
applyResumeOverrides already patches each one in-place into meta, and
the SDK's next turn picks them up from the updated meta. No thread
rotation, no transcript loss.

The only remaining rotation reason is dynamicToolsFingerprint
mismatch — the SDK's MCP server registration is set at thread/start
and there's no resume-time refresh path for it. Rotation here still
drops the SDK transcript; logged loudly ("rotating thread (transcript
will reset)") so we'll see it on the wire. Follow-up needed if/when
the catalog churn becomes visible in practice (file a beads issue then).

Concretely:
 - approvalPolicy diverged → resume with {approvalPolicy}
 - developerInstructions hash diverged → resume with {developerInstructions}
 - cwd diverged (Tank-#6) → resume with {cwd}
After any of these patches, we rewrite the binding sidecar so the new
state is the baseline for next resume — no re-patching every turn.

Tank-#7 P3 — `appServer.statePath` was exposed in the plugin schema +
uiHints but was never read by the extension or the server. ThreadStore
state goes to `<sessionFile>.claude-binding.json` regardless. Removed
from schema rather than wire it, since binding-per-session-file is the
right shape and a global state-path override has no current use case.
If a deployment needs to relocate state, the cleaner path is to move
the session files (which the binding sidecar follows by construction).

Type-check (tsgo:extensions) clean.
zeroaltitude added a commit that referenced this pull request May 21, 2026
…tations) + P3 (statePath cleanup)

Tank-#7 P2 — approvalPolicy and developerInstructions rotations were
still calling thread/start and therefore still eating the SDK
conversation transcript, despite the cwd-via-resume fix. Same fix
pattern as cwd: send the divergent fields on thread/resume, the server's
applyResumeOverrides already patches each one in-place into meta, and
the SDK's next turn picks them up from the updated meta. No thread
rotation, no transcript loss.

The only remaining rotation reason is dynamicToolsFingerprint
mismatch — the SDK's MCP server registration is set at thread/start
and there's no resume-time refresh path for it. Rotation here still
drops the SDK transcript; logged loudly ("rotating thread (transcript
will reset)") so we'll see it on the wire. Follow-up needed if/when
the catalog churn becomes visible in practice (file a beads issue then).

Concretely:
 - approvalPolicy diverged → resume with {approvalPolicy}
 - developerInstructions hash diverged → resume with {developerInstructions}
 - cwd diverged (Tank-#6) → resume with {cwd}
After any of these patches, we rewrite the binding sidecar so the new
state is the baseline for next resume — no re-patching every turn.

Tank-#7 P3 — `appServer.statePath` was exposed in the plugin schema +
uiHints but was never read by the extension or the server. ThreadStore
state goes to `<sessionFile>.claude-binding.json` regardless. Removed
from schema rather than wire it, since binding-per-session-file is the
right shape and a global state-path override has no current use case.
If a deployment needs to relocate state, the cleaner path is to move
the session files (which the binding sidecar follows by construction).

Type-check (tsgo:extensions) clean.
zeroaltitude added a commit that referenced this pull request May 21, 2026
… (broke build)

The Tank-#7 P3 commit (3a298ba) removed the statePath schema block
but left the trailing comma after turnIdleTimeoutMs's closing brace,
which invalidated the JSON and broke 'pnpm build':
  Expected double-quoted property name in JSON at position 2165 (line 55 column 9)

Drop the comma.
zeroaltitude added a commit that referenced this pull request May 21, 2026
… (broke build)

The Tank-#7 P3 commit (3a298ba) removed the statePath schema block
but left the trailing comma after turnIdleTimeoutMs's closing brace,
which invalidated the JSON and broke 'pnpm build':
  Expected double-quoted property name in JSON at position 2165 (line 55 column 9)

Drop the comma.
zeroaltitude added a commit that referenced this pull request May 21, 2026
…Slack vs Discord footer divergence diagnostic

Tank-#7-followup live diagnostic. The slack-vs-discord provenance footer
asymmetry can't be channel-side hook wiring (capabilities and dispatcher
construction are structurally equivalent), so the divergence must be in
WHICH channel deliveries reach deliverOutboundPayloads — that's the one
entry point that calls applyMessageSendingHook (besides the dispatcher's
auto-reply wrapper, which neither slack nor discord goes through).

Adding an info-level log at deliverOutboundPayloads entry with
channel/to/sessionKey/payloads-len so we can see, on the live gateway,
whether discord deliveries actually pass through here for Tabitha's
user-prompted replies (and slack ones don't). The answer narrows where
the regression lives.

To remove once the asymmetry is understood.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
zeroaltitude added a commit that referenced this pull request May 21, 2026
…Slack vs Discord footer divergence diagnostic

Tank-#7-followup live diagnostic. The slack-vs-discord provenance footer
asymmetry can't be channel-side hook wiring (capabilities and dispatcher
construction are structurally equivalent), so the divergence must be in
WHICH channel deliveries reach deliverOutboundPayloads — that's the one
entry point that calls applyMessageSendingHook (besides the dispatcher's
auto-reply wrapper, which neither slack nor discord goes through).

Adding an info-level log at deliverOutboundPayloads entry with
channel/to/sessionKey/payloads-len so we can see, on the live gateway,
whether discord deliveries actually pass through here for Tabitha's
user-prompted replies (and slack ones don't). The answer narrows where
the regression lives.

To remove once the asymmetry is understood.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
zeroaltitude added a commit that referenced this pull request May 22, 2026
Tank report 2026-05-22 trio #3 (final).

Mirrors extensions/codex/src/app-server/thread-lifecycle.ts at smaller
scope. Owns the rotate-vs-resume decision tree, the binding-compatibility
checks, and the in-place resume patch envelope that lets the server
absorb cwd/approvalPolicy/developerInstructions changes without losing
the SDK transcript.

Pulled out of run-attempt.ts so future fixes (thread/fork support,
server-side mcpServers refresh on resume, additional rotation reasons)
land in a dedicated module instead of inflating the turn runner.

Public surface:
- startOrResumeClaudeThread(args) → { threadId, outcome, rotationReason? }
  outcome: "resumed" (in-place patch path) | "started" (fresh thread/start)
- isThreadNotFound(err): predicate exposed for callers that need to
  distinguish thread-not-found from transport errors.

Run-attempt.ts changes:
- Replaced inline ensureThread() (~150 LOC) with startOrResumeClaudeThread.
- Removed inline isThreadNotFound + THREAD_NOT_FOUND_RE.
- Kept fingerprintString (used by developerInstructionsFingerprint
  computation that callers still drive).
- Comment references updated from ensureThread → thread-lifecycle.

The extraction preserves all existing rotation/resume semantics:
- Tank #6 cwd in-place patch.
- Tank #7 approvalPolicy + developerInstructions in-place patches.
- dynamic tool fingerprint mismatch is the only rotation reason.
- thread-not-found on resume falls back to fresh start.
- KNOWN LIMITATION docblock about mid-session catalog churn carried
  forward verbatim.

Test coverage in thread-lifecycle.test.ts (11 tests, isolated from the
turn runner):
- Fresh start when no binding exists.
- Binding sidecar written on fresh start with correct fingerprints.
- Resume when fingerprint matches.
- Rotation with the dynamic-tool-catalog reason on fingerprint shift.
- thread-not-found error from thread/resume → fresh start recovery.
- Other resume errors propagate (ECONNRESET stays an ECONNRESET).
- In-place patch envelope sends cwd/approvalPolicy/developerInstructions
  when they diverge, persists patched values to the binding.
- Patch envelope is empty when nothing diverged (one network round-trip
  per turn, no spurious patches).
- isThreadNotFound: top-level message + nested data.message paths;
  unrelated errors return false.

Validation: tsgo:core clean; vitest 75/75 (entire claude suite includes
new 11 lifecycle tests + 64 from earlier); oxlint clean.
zeroaltitude added a commit that referenced this pull request May 22, 2026
Tank report 2026-05-22 P2: "If thread/fork is too much for this pass,
keep current rotation behavior but make the limitation explicit in PR
notes." thread-lifecycle.ts already carries the KNOWN LIMITATION
docblock for in-tree maintainers; the README didn't surface it for
upstream-PR readers and end users.

Adds a "Known limitations" section to extensions/claude/README.md
covering:

1. Tool-catalog change resets conversation transcript (the rotation
   reason that survives the in-place resume patches added in Tank #6/#7).
   Documents the root cause (SDK MCP registration is fixed at
   thread/start, not refreshable on resume) and the two mitigations
   under consideration: thread/fork support on the server, or
   refreshable MCP registration in the SDK.

2. @openclaw/claude-app-server pre-publish install path (re-surfaced
   from the install section for the limitations index).

3. Codex parity scope still pending — event projection, transcript
   mirroring, dynamic-tool middleware. Architecturally the scaffolding
   to land these (config.ts, protocol-validators.ts,
   thread-lifecycle.ts) is in place, just not yet exercised. Linked
   to beads openclaw-7w9.

Docs-only; no code change.
steipete added a commit that referenced this pull request Jul 29, 2026
…w#115333)

* fix(tooling): check changed exports for dead code

* fix(tooling): name mismatched PR wrapper components

* feat(tooling): repin PR review artifacts

* fix(tooling): scope dead-export detection to source files

Matching only the top-level tree let a docs file under src/ carrying `export`
in a code sample set the flag. That mattered because the flag also short-
circuited changedCheckRequiresRemote above its docsOnly guard, so a docs-only
change could be dragged onto the heavy remote route and made to run knip.

Scope detection to the source extensions knip actually reads, and drop the
routing branch entirely: any file that can now trigger detection already
enables a non-docs lane, which the existing final clause routes remotely. The
branch was dead for every real source change and wrong for the docs case.

* refactor(tooling): round-trip the repinned review JSON

Preserving byte-exact formatting required a hand-rolled JSON scanner: string
escape handling, container nesting, and span splicing, for a file that lives in
gitignored .local/ and is only ever read back through JSON.parse.

repin already parses the artifact to validate it, so assign the two identity
fields and re-serialize. JSON.parse/stringify keeps insertion order, which is
the only formatting property worth holding. Drops four helpers.

* fix(tooling): select the dead-export scan by path, not changed lines

Inspecting changed lines for an `export` token has two false negatives that
defeat the purpose. Barrels export through multiline `export { ... }` lists, so
removing a symbol changes a line carrying no `export` token. Worse, the failure
that motivated this scan was an import-only edit: it orphaned a re-export in a
barrel the diff never touched, which no changed-line rule can see.

Select by path instead: any changed production source file under src/,
extensions/, ui/, or packages/. This also removes the merge-base dependency, so
a shallow checkout or unrelated history can no longer silently skip the scan.

Those paths already enable a non-docs lane, so the run already routes remotely
and knip's cost lands on the box already doing the heavy work.
OPENCLAW_CHECK_CHANGED_SKIP_DEADCODE=1 still opts out.

* Revert "feat(tooling): repin PR review artifacts"

The repin subcommand defeats the property the identity pin exists to enforce.
It rewrites the pinned PR number and head SHA while keeping every
recommendation, finding, and Markdown conclusion, so a completed
"READY FOR /prepare-pr" verdict authored against one revision can be relabelled
as covering another and then pass validation. The test added alongside it
restamped PR #7 as PR openclaw#42 and asserted validation succeeded, which is exactly
the substitution the fail-closed gate was built to stop.

Re-authoring a review after the head moves is friction on purpose: the code the
verdict describes may no longer be the code being landed. A safe version has to
prove the reviewed content is equivalent across the move, which is a design
decision about what equivalence means, not a convenience wrapper.

Reverts 5d89a70 and its follow-up c6304eb.

* docs(tooling): note why the wrapper diagnostic reads HEAD blobs

Two reviewers independently read the new component comparison as inspecting
committed state while the refusal was triggered by working-tree files. The
uncommitted-wrapper guard above already exits for any staged or unstaged edit to
these three paths, so HEAD matches the working tree by the time this runs. State
the invariant at the site instead of letting a third reader re-derive it.

* fix(tooling): cover jsx in the dead-export source selector

The hand-written extension alternation matched .tsx but not .jsx, so a JSX
source change would skip a scan that knip does apply to it. Use the
`[cm]?[jt]sx?` selector the lint lanes in check-changed.mjs already use, which
covers both and is shorter, and pin the extension coverage in tests.
zeroaltitude pushed a commit that referenced this pull request Oct 8, 2026
openclaw#166738)

Builds on openclaw#166737 (merged: curated `scripts/lib/recommended-models.json` + shared `canonicalModelKey`/`canonicalModelFamily`/`compareModelRecency`); this PR only adds the helper script and its test.

## What Problem This Solves

The recommended-models list is now curated by hand, so a maintainer needs a daily, reviewable signal for what to change: new releases, Arena reorderings, and entries that are retired or no longer served.

## User Impact

No user-visible change. Maintainers (and later a daily draft-PR agent) can run

```
OPENROUTER_API_KEY=... node --import ./scripts/tsx.mjs scripts/suggest-recommended-models.mts [--list <path>]
```

and get a markdown report ending in a unified diff against `scripts/lib/recommended-models.json`. The list file is never written; a human edits it.

## Why This Change Was Made

TypeScript port of the recv2 prototype's ranking: LMArena Agent Arena score first; equal scores, and models without one, order by OpenRouter 30-day usage. The newest served family member without its own Arena row takes the slot of its newest ranked older sibling, counting at least that sibling's usage, so it sorts directly ahead of it (release date decides recency, so grok-4.20 does not outrank grok-4.7). DeepSWE is dropped; `-fast` and other serving variants fold into the base model.

- Inputs: every run fetches each source fresh, with no cache; a failed request or a response that fails schema validation fails that run. Sources: LMArena Agent Arena `agent/latest` through the HF datasets-server JSON rows endpoint (no parquet dependency), OpenRouter `/api/v1/models`, OpenRouter `rankings-daily` (only when `OPENROUTER_API_KEY` is set; otherwise curated entries without an Arena score keep their order), Vercel `/v1/models`, and the hosted catalog v2.
- Identity: each source id resolves once through the shared `canonicalModelKey`, with its display name, so dated aliases join their versioned model. Examples: `mistral-small-2603` is Mistral Small 4, OpenRouter `mistral-large-4-0` matches Vercel `mistral-large-4`, and usage arrives through OpenRouter `canonical_slug`. Non-chat models are excluded by gateway modality or type labels; `-latest` aliases are excluded.
- Report sections:
  - **New models:** first seen within 7 days and not listed. Each shows its likely same-family predecessor and both prices, and is flagged `possible new class` when either price differs by more than 2x or the family has no predecessor.
  - **Arena moves:** rank changes among entries both lists keep, largest first.
  - **Gone or deprecated:** first-party retired with its replacement, no longer served, or no signal.
  - **Suggested list:** the full ordered list plus the diff.

No overlap with Pash/Sarah changes (the PR adds one new file).

## Evidence

- Port fidelity: on the live inputs, the helper reproduced the prototype's 86-id suggested list exactly before the review-driven identity fixes. Two differences remain, and openclaw#166737's seed list already includes both: `mistral-medium-2604` is folded into `mistral-medium-3.5` because they are the same model, and `ling-3.0-flash-*` is now spelled `ling-3-flash-*` because zero minor versions fold.
- Typecheck: `node scripts/run-tsgo.mjs -p tsconfig.scripts.json` and `tsgo:test:root` report no errors; scoped oxlint and oxfmt are clean. `canonical-model-key.test.ts` passed 32/32.
- Ordering: `test/scripts/suggest-recommended-models.test.ts` feeds stubbed sources through the real entry point. Two models tied on Arena score order by usage (the higher-usage one first, against alphabetical order), and a successor that inherits its sibling's Arena slot still sorts ahead of that higher-usage sibling. With the previous alphabetical tiebreak the test fails.
- Cost: `pnpm test test/scripts/suggest-recommended-models.test.ts --maxWorkers=1` takes 2.2 s wall end to end (Vitest 0.78 s; the test itself 9 ms). CI on this head: run 37692398322, green in 595 s wall and 5,717 job-seconds across 58 jobs for the whole PR; the new test adds about 9 ms of that.
- Error and fallback paths: a list containing `claude-opus-4.8` reported "retired by its first-party provider; replaced by claude-opus-5", and `nonexistent-model-9` reported "no host serves it". A missing `--list` file exits 1 with a clear message. Without a key, the report states that usage was skipped and keeps unscored curated entries. With an invalid `OPENROUTER_API_KEY`, the run exits 1 with `https://openrouter.ai/api/v1/datasets/rankings-daily returned HTTP 401` and prints no report.
- Live run: all inputs were fetched fresh (5 requests, 3.9 s wall). Both outputs below are copied verbatim. In the live data the only exact Arena ties are successor/sibling pairs (`gpt-5.6`/`gpt-5.4`, `mimo-v2.6-pro`/`mimo-v2.5-pro`), and each successor sorts first.

Run against the curated list in openclaw#166737, using the default path:

# Recommended models suggestion, 2026-10-07

## Sources
- LMArena Agent Arena, published 2026-10-02: 50 rows, 48 models. Source: LMArena Agent Arena (lmarena-ai/leaderboard-dataset), CC BY 4.0.
- OpenRouter rankings-daily 2026-09-07..2026-10-06. Source: OpenRouter (openrouter.ai/rankings), as of 2026-10-07T21:06:52.590Z. Licensed under CC BY 4.0.
- Catalog v2 generated 2026-09-29 (1039 rows), OpenRouter models (467), Vercel AI Gateway models (415): 490 served chat models.

## New models (first seen in the last 7 days, not listed)

| model | first seen | suggested | price in/out per 1M | predecessor | predecessor price | note |
| --- | --- | --- | --- | --- | --- | --- |
| glyph-cluster | 2026-10-07 | no signal yet | ? | none |  | possible new class: no predecessor |
| mistral-large-4 | 2026-10-06 | no signal yet | $0.68 / $2.09 | mistral-large-3 | $0.5 / $1.5 |  |
| apodex-1.1-mini | 2026-10-01 | no signal yet | ? | none |  | possible new class: no predecessor |
| pareto-26.10-preview | 2026-10-01 | no signal yet | $0.8 / $3.2 | none |  | possible new class: no predecessor |

## Arena moves

None.

## Gone or deprecated

None.

## Suggested list

<details><summary>85 models</summary>

| # | model | signal |
| --- | --- | --- |
| 1 | claude-fable-5.1 | Arena 0.143 (#1) |
| 2 | claude-opus-5.5 | Arena 0.138 (#2) |
| 3 | claude-sonnet-5.5 | Arena 0.125 (#3) |
| 4 | gpt-6-astra | Arena 0.123 (#4) |
| 5 | gpt-6.1-sol | Arena 0.112 (#5) |
| 6 | gpt-6-sol | Arena 0.097 (#6) |
| 7 | claude-opus-5 | Arena 0.087 (#7) |
| 8 | claude-fable-5 | Arena 0.082 (#8) |
| 9 | gpt-5.6-sol | Arena 0.065 (#12) |
| 10 | claude-sonnet-5 | Arena 0.044 (#13) |
| 11 | kimi-k3 | Arena 0.042 (#14) |
| 12 | grok-4.7 | Arena 0.040 (#16) |
| 13 | deepseek-v4.1-flash | Arena 0.040 (#17) |
| 14 | muse-spark-1.3 | Arena 0.040 (#18) |
| 15 | hy4-preview | Arena 0.040 (#19) |
| 16 | glm-5.2 | Arena 0.035 (#20) |
| 17 | gemini-3.8-flash | Arena 0.030 (#21) |
| 18 | qwen3.8-max | Arena 0.025 (openclaw#22) |
| 19 | glm-5.3 | Arena 0.024 (openclaw#23) |
| 20 | gpt-6-luna | Arena 0.014 (openclaw#24) |
| 21 | grok-4.6 | Arena 0.013 (openclaw#25) |
| 22 | grok-4.5 | Arena 0.012 (openclaw#26) |
| 23 | deepseek-v4-pro | Arena 0.012 (openclaw#27) |
| 24 | gpt-5.6 | Arena 0.011 (openclaw#28) via gpt-5.4 |
| 25 | gpt-5.4 | Arena 0.011 (openclaw#28) |
| 26 | step-5-preview | Arena 0.005 (openclaw#30) |
| 27 | gpt-5.6-terra | Arena 0.004 (openclaw#31) |
| 28 | glm-5.3-flash | Arena -0.004 (openclaw#32) |
| 29 | mimo-v2.6-flash | Arena -0.006 (openclaw#33) |
| 30 | gpt-5.6-luna | Arena -0.012 (openclaw#35) |
| 31 | gemini-3.7-flash | Arena -0.015 (openclaw#36) |
| 32 | qwen3.8-27b | Arena -0.017 (openclaw#37) |
| 33 | muse-spark-1.2 | Arena -0.033 (openclaw#38) |
| 34 | muse-spark-1.1 | Arena -0.049 (openclaw#39) |
| 35 | qwen3.7-max | Arena -0.051 (openclaw#40) |
| 36 | hy3 | Arena -0.054 (openclaw#41) |
| 37 | minimax-m3 | Arena -0.069 (openclaw#42) |
| 38 | qwen3.7-plus | Arena -0.072 (openclaw#43) |
| 39 | mimo-v2.6-pro | Arena -0.075 (openclaw#44) via mimo-v2.5-pro |
| 40 | mimo-v2.5-pro | Arena -0.075 (openclaw#44) |
| 41 | gemini-3.6-flash | Arena -0.077 (openclaw#45) |
| 42 | gemini-3.1-pro-preview | Arena -0.077 (openclaw#46) |
| 43 | inkling-small | Arena -0.103 (openclaw#47) |
| 44 | inkling | Arena -0.109 (openclaw#48) |
| 45 | mistral-medium-3.5 | Arena -0.124 (openclaw#49) |
| 46 | solar-pro4 | Arena -0.159 (openclaw#50) |
| 47 | space-bunny-alpha | OpenRouter 56.7T |
| 48 | deepseek-v4-flash | OpenRouter 53.3T |
| 49 | nemotron-3-ultra-550b-a55b | OpenRouter 21.1T |
| 50 | mimo-v2.5 | OpenRouter 18.9T |
| 51 | laguna-s-2.1 | OpenRouter 4.6T |
| 52 | gemini-3-flash-preview | OpenRouter 3.4T |
| 53 | ling-3-flash-fin | OpenRouter 3.4T |
| 54 | gemini-2.5-flash-lite | OpenRouter 3.0T |
| 55 | nemotron-3.5-lightning | OpenRouter 2.7T |
| 56 | gpt-oss-120b | OpenRouter 2.5T |
| 57 | dots-3-note-preview | OpenRouter 2.4T |
| 58 | gemini-3.1-flash-lite | OpenRouter 2.1T |
| 59 | gemini-2.5-flash | OpenRouter 2.0T |
| 60 | qwen3.8-flash | OpenRouter 1.8T |
| 61 | gemma-4-31b | OpenRouter 1.7T |
| 62 | claude-sonnet-4.6 | OpenRouter 1.4T |
| 63 | deepseek-v3.2 | OpenRouter 1.4T |
| 64 | qwen3.7-flash | OpenRouter 1.4T |
| 65 | ling-3-flash-sante | OpenRouter 1.2T |
| 66 | nemotron-3-super-120b-a12b | OpenRouter 1.2T |
| 67 | nex-n2.5-pro | OpenRouter 1.1T |
| 68 | ling-3-flash-vl | OpenRouter 1.0T |
| 69 | gpt-6-luna-pro | OpenRouter 853B |
| 70 | gemma-4-26b-a4b | OpenRouter 845B |
| 71 | gpt-5.6-luna-pro | OpenRouter 566B |
| 72 | solar-mini4 | OpenRouter 510B |
| 73 | deepseek-v4-flash-vision-exp | OpenRouter 430B |
| 74 | mistral-nemo | OpenRouter 384B |
| 75 | ling-3.1-flash | OpenRouter 298B |
| 76 | glm-5.3-flashx | OpenRouter 187B |
| 77 | gpt-oss-20b | OpenRouter 127B |
| 78 | gemini-3.5-flash-lite | OpenRouter 124B |
| 79 | minimax-m2.7 | OpenRouter 113B |
| 80 | gpt-4o-mini | OpenRouter 89B |
| 81 | claude-haiku-5.5 | OpenRouter 82B via claude-haiku-4.5 |
| 82 | claude-haiku-4.5 | OpenRouter 82B |
| 83 | claude-opus-4.7 | OpenRouter 55B |
| 84 | step-3.7-flash | OpenRouter 50B |
| 85 | claude-sonnet-4.5 | OpenRouter 46B |

</details>

No changes to the curated list.

<details><summary>Same inputs against the 2026-09-27 list (shows Arena moves, a drop, a 10x price flag and the diff)</summary>

# Recommended models suggestion, 2026-10-07

## Sources
- LMArena Agent Arena, published 2026-10-02: 50 rows, 48 models. Source: LMArena Agent Arena (lmarena-ai/leaderboard-dataset), CC BY 4.0.
- OpenRouter rankings-daily 2026-09-07..2026-10-06. Source: OpenRouter (openrouter.ai/rankings), as of 2026-10-07T21:07:02.742Z. Licensed under CC BY 4.0.
- Catalog v2 generated 2026-09-29 (1039 rows), OpenRouter models (467), Vercel AI Gateway models (415): 490 served chat models.

## New models (first seen in the last 7 days, not listed)

| model | first seen | suggested | price in/out per 1M | predecessor | predecessor price | note |
| --- | --- | --- | --- | --- | --- | --- |
| claude-haiku-5.5 | 2026-10-07 | openclaw#81 | $0.1 / $0.5 | claude-haiku-4.5 | $1 / $5 | possible new class: price 10.0x |
| glyph-cluster | 2026-10-07 | no signal yet | ? | none |  | possible new class: no predecessor |
| mistral-large-4 | 2026-10-06 | no signal yet | $0.68 / $2.09 | mistral-large-3 | $0.5 / $1.5 |  |
| apodex-1.1-mini | 2026-10-01 | no signal yet | ? | none |  | possible new class: no predecessor |
| pareto-26.10-preview | 2026-10-01 | no signal yet | $0.8 / $3.2 | none |  | possible new class: no predecessor |

## Arena moves

| model | listed | suggested | signal |
| --- | --- | --- | --- |
| mimo-v2.6-flash | openclaw#47 | openclaw#29 | Arena -0.006 (openclaw#33) |
| gpt-6-luna | openclaw#24 | #20 | Arena 0.014 (openclaw#24) |
| grok-4.7 | #15 | #12 | Arena 0.040 (#16) |
| deepseek-v4-pro | #16 | openclaw#23 | Arena 0.012 (openclaw#27) |
| gemini-3.8-flash | #11 | #17 | Arena 0.030 (#21) |
| hy4-preview | #10 | #15 | Arena 0.040 (#19) |
| mimo-v2.6-pro | openclaw#32 | openclaw#39 | Arena -0.075 (openclaw#44) via mimo-v2.5-pro |
| mimo-v2.5-pro | openclaw#33 | openclaw#40 | Arena -0.075 (openclaw#44) |
| gemini-3.1-pro-preview | openclaw#35 | openclaw#42 | Arena -0.077 (openclaw#46) |
| solar-pro4 | openclaw#45 | openclaw#46 | Arena -0.159 (openclaw#50) |
| gpt-6-sol | #6 | #6 | Arena 0.097 (#6) |
| muse-spark-1.3 | #14 | #14 | Arena 0.040 (#18) |
| qwen3.8-max | #18 | #18 | Arena 0.025 (openclaw#22) |
| gpt-5.6-terra | #21 | openclaw#27 | Arena 0.004 (openclaw#31) |
| qwen3.7-plus | openclaw#36 | openclaw#38 | Arena -0.072 (openclaw#43) |
| claude-opus-5.5 | #3 | #2 | Arena 0.138 (#2) |
| gpt-6-astra | #2 | #4 | Arena 0.123 (#4) |
| claude-opus-5 | #4 | #7 | Arena 0.087 (#7) |
| claude-fable-5 | #5 | #8 | Arena 0.082 (#8) |
| deepseek-v4.1-flash | #12 | #13 | Arena 0.040 (#17) |
| glm-5.2 | #13 | #16 | Arena 0.035 (#20) |
| grok-4.6 | #20 | #21 | Arena 0.013 (openclaw#25) |
| grok-4.5 | #19 | openclaw#22 | Arena 0.012 (openclaw#26) |
| glm-5.3-flash | openclaw#23 | openclaw#28 | Arena -0.004 (openclaw#32) |
| gpt-5.6-luna | openclaw#25 | openclaw#30 | Arena -0.012 (openclaw#35) |
| gemini-3.7-flash | openclaw#26 | openclaw#31 | Arena -0.015 (openclaw#36) |
| qwen3.8-27b | openclaw#27 | openclaw#32 | Arena -0.017 (openclaw#37) |
| muse-spark-1.2 | openclaw#28 | openclaw#33 | Arena -0.033 (openclaw#38) |
| muse-spark-1.1 | openclaw#29 | openclaw#34 | Arena -0.049 (openclaw#39) |
| qwen3.7-max | openclaw#30 | openclaw#35 | Arena -0.051 (openclaw#40) |
| hy3 | openclaw#31 | openclaw#36 | Arena -0.054 (openclaw#41) |
| minimax-m3 | openclaw#34 | openclaw#37 | Arena -0.069 (openclaw#42) |
| inkling-small | openclaw#38 | openclaw#43 | Arena -0.103 (openclaw#47) |
| inkling | openclaw#39 | openclaw#44 | Arena -0.109 (openclaw#48) |
| mistral-medium-3.5 | openclaw#40 | openclaw#45 | Arena -0.124 (openclaw#49) |

29 usage-ranked entries also move; see the diff.

## Gone or deprecated

- ling-3.0-flash-fin: no host serves it
- ling-3.0-flash-vl: no host serves it
- ling-3.0-flash-sante: no host serves it
- kimi-k2.6: no Arena score and no OpenRouter usage in the window

## Suggested list

<details><summary>85 models</summary>

| # | model | signal |
| --- | --- | --- |
| 1 | claude-fable-5.1 | Arena 0.143 (#1) |
| 2 | claude-opus-5.5 | Arena 0.138 (#2) |
| 3 | claude-sonnet-5.5 | Arena 0.125 (#3) |
| 4 | gpt-6-astra | Arena 0.123 (#4) |
| 5 | gpt-6.1-sol | Arena 0.112 (#5) |
| 6 | gpt-6-sol | Arena 0.097 (#6) |
| 7 | claude-opus-5 | Arena 0.087 (#7) |
| 8 | claude-fable-5 | Arena 0.082 (#8) |
| 9 | gpt-5.6-sol | Arena 0.065 (#12) |
| 10 | claude-sonnet-5 | Arena 0.044 (#13) |
| 11 | kimi-k3 | Arena 0.042 (#14) |
| 12 | grok-4.7 | Arena 0.040 (#16) |
| 13 | deepseek-v4.1-flash | Arena 0.040 (#17) |
| 14 | muse-spark-1.3 | Arena 0.040 (#18) |
| 15 | hy4-preview | Arena 0.040 (#19) |
| 16 | glm-5.2 | Arena 0.035 (#20) |
| 17 | gemini-3.8-flash | Arena 0.030 (#21) |
| 18 | qwen3.8-max | Arena 0.025 (openclaw#22) |
| 19 | glm-5.3 | Arena 0.024 (openclaw#23) |
| 20 | gpt-6-luna | Arena 0.014 (openclaw#24) |
| 21 | grok-4.6 | Arena 0.013 (openclaw#25) |
| 22 | grok-4.5 | Arena 0.012 (openclaw#26) |
| 23 | deepseek-v4-pro | Arena 0.012 (openclaw#27) |
| 24 | gpt-5.6 | Arena 0.011 (openclaw#28) via gpt-5.4 |
| 25 | gpt-5.4 | Arena 0.011 (openclaw#28) |
| 26 | step-5-preview | Arena 0.005 (openclaw#30) |
| 27 | gpt-5.6-terra | Arena 0.004 (openclaw#31) |
| 28 | glm-5.3-flash | Arena -0.004 (openclaw#32) |
| 29 | mimo-v2.6-flash | Arena -0.006 (openclaw#33) |
| 30 | gpt-5.6-luna | Arena -0.012 (openclaw#35) |
| 31 | gemini-3.7-flash | Arena -0.015 (openclaw#36) |
| 32 | qwen3.8-27b | Arena -0.017 (openclaw#37) |
| 33 | muse-spark-1.2 | Arena -0.033 (openclaw#38) |
| 34 | muse-spark-1.1 | Arena -0.049 (openclaw#39) |
| 35 | qwen3.7-max | Arena -0.051 (openclaw#40) |
| 36 | hy3 | Arena -0.054 (openclaw#41) |
| 37 | minimax-m3 | Arena -0.069 (openclaw#42) |
| 38 | qwen3.7-plus | Arena -0.072 (openclaw#43) |
| 39 | mimo-v2.6-pro | Arena -0.075 (openclaw#44) via mimo-v2.5-pro |
| 40 | mimo-v2.5-pro | Arena -0.075 (openclaw#44) |
| 41 | gemini-3.6-flash | Arena -0.077 (openclaw#45) |
| 42 | gemini-3.1-pro-preview | Arena -0.077 (openclaw#46) |
| 43 | inkling-small | Arena -0.103 (openclaw#47) |
| 44 | inkling | Arena -0.109 (openclaw#48) |
| 45 | mistral-medium-3.5 | Arena -0.124 (openclaw#49) |
| 46 | solar-pro4 | Arena -0.159 (openclaw#50) |
| 47 | space-bunny-alpha | OpenRouter 56.7T |
| 48 | deepseek-v4-flash | OpenRouter 53.3T |
| 49 | nemotron-3-ultra-550b-a55b | OpenRouter 21.1T |
| 50 | mimo-v2.5 | OpenRouter 18.9T |
| 51 | laguna-s-2.1 | OpenRouter 4.6T |
| 52 | gemini-3-flash-preview | OpenRouter 3.4T |
| 53 | ling-3-flash-fin | OpenRouter 3.4T |
| 54 | gemini-2.5-flash-lite | OpenRouter 3.0T |
| 55 | nemotron-3.5-lightning | OpenRouter 2.7T |
| 56 | gpt-oss-120b | OpenRouter 2.5T |
| 57 | dots-3-note-preview | OpenRouter 2.4T |
| 58 | gemini-3.1-flash-lite | OpenRouter 2.1T |
| 59 | gemini-2.5-flash | OpenRouter 2.0T |
| 60 | qwen3.8-flash | OpenRouter 1.8T |
| 61 | gemma-4-31b | OpenRouter 1.7T |
| 62 | claude-sonnet-4.6 | OpenRouter 1.4T |
| 63 | deepseek-v3.2 | OpenRouter 1.4T |
| 64 | qwen3.7-flash | OpenRouter 1.4T |
| 65 | ling-3-flash-sante | OpenRouter 1.2T |
| 66 | nemotron-3-super-120b-a12b | OpenRouter 1.2T |
| 67 | nex-n2.5-pro | OpenRouter 1.1T |
| 68 | ling-3-flash-vl | OpenRouter 1.0T |
| 69 | gpt-6-luna-pro | OpenRouter 853B |
| 70 | gemma-4-26b-a4b | OpenRouter 845B |
| 71 | gpt-5.6-luna-pro | OpenRouter 566B |
| 72 | solar-mini4 | OpenRouter 510B |
| 73 | deepseek-v4-flash-vision-exp | OpenRouter 430B |
| 74 | mistral-nemo | OpenRouter 384B |
| 75 | ling-3.1-flash | OpenRouter 298B |
| 76 | glm-5.3-flashx | OpenRouter 187B |
| 77 | gpt-oss-20b | OpenRouter 127B |
| 78 | gemini-3.5-flash-lite | OpenRouter 124B |
| 79 | minimax-m2.7 | OpenRouter 113B |
| 80 | gpt-4o-mini | OpenRouter 89B |
| 81 | claude-haiku-5.5 | OpenRouter 82B via claude-haiku-4.5 |
| 82 | claude-haiku-4.5 | OpenRouter 82B |
| 83 | claude-opus-4.7 | OpenRouter 55B |
| 84 | step-3.7-flash | OpenRouter 50B |
| 85 | claude-sonnet-4.5 | OpenRouter 46B |

</details>

```diff
--- a/../../../../../../tmp/recprobe/list-20260927.json
+++ b/../../../../../../tmp/recprobe/list-20260927.json
@@ -1,80 +1,87 @@
 [
   "claude-fable-5.1",
-  "gpt-6-astra",
   "claude-opus-5.5",
+  "claude-sonnet-5.5",
+  "gpt-6-astra",
+  "gpt-6.1-sol",
+  "gpt-6-sol",
   "claude-opus-5",
   "claude-fable-5",
-  "gpt-6-sol",
   "gpt-5.6-sol",
   "claude-sonnet-5",
   "kimi-k3",
-  "hy4-preview",
-  "gemini-3.8-flash",
+  "grok-4.7",
   "deepseek-v4.1-flash",
-  "glm-5.2",
   "muse-spark-1.3",
-  "grok-4.7",
-  "deepseek-v4-pro",
-  "glm-5.3",
+  "hy4-preview",
+  "glm-5.2",
+  "gemini-3.8-flash",
   "qwen3.8-max",
-  "grok-4.5",
+  "glm-5.3",
+  "gpt-6-luna",
   "grok-4.6",
-  "gpt-5.6-terra",
+  "grok-4.5",
+  "deepseek-v4-pro",
+  "gpt-5.6",
   "gpt-5.4",
+  "step-5-preview",
+  "gpt-5.6-terra",
   "glm-5.3-flash",
-  "gpt-6-luna",
+  "mimo-v2.6-flash",
   "gpt-5.6-luna",
   "gemini-3.7-flash",
   "qwen3.8-27b",
   "muse-spark-1.2",
   "muse-spark-1.1",
   "qwen3.7-max",
   "hy3",
-  "mimo-v2.6-pro",
-  "mimo-v2.5-pro",
   "minimax-m3",
-  "gemini-3.1-pro-preview",
   "qwen3.7-plus",
+  "mimo-v2.6-pro",
+  "mimo-v2.5-pro",
   "gemini-3.6-flash",
+  "gemini-3.1-pro-preview",
   "inkling-small",
   "inkling",
   "mistral-medium-3.5",
+  "solar-pro4",
+  "space-bunny-alpha",
   "deepseek-v4-flash",
-  "mimo-v2.5",
   "nemotron-3-ultra-550b-a55b",
-  "space-bunny-alpha",
-  "solar-pro4",
+  "mimo-v2.5",
   "laguna-s-2.1",
-  "mimo-v2.6-flash",
-  "ling-3.0-flash-fin",
   "gemini-3-flash-preview",
-  "nemotron-3.5-lightning",
+  "ling-3-flash-fin",
   "gemini-2.5-flash-lite",
-  "claude-sonnet-4.6",
+  "nemotron-3.5-lightning",
   "gpt-oss-120b",
-  "gemini-2.5-flash",
-  "gemini-3.1-flash-lite",
   "dots-3-note-preview",
-  "deepseek-v3.2",
-  "gemma-4-31b",
+  "gemini-3.1-flash-lite",
+  "gemini-2.5-flash",
   "qwen3.8-flash",
+  "gemma-4-31b",
+  "claude-sonnet-4.6",
+  "deepseek-v3.2",
+  "qwen3.7-flash",
+  "ling-3-flash-sante",
   "nemotron-3-super-120b-a12b",
+  "nex-n2.5-pro",
+  "ling-3-flash-vl",
+  "gpt-6-luna-pro",
   "gemma-4-26b-a4b",
   "gpt-5.6-luna-pro",
-  "qwen3.7-flash",
-  "ling-3.0-flash-vl",
-  "minimax-m2.7",
+  "solar-mini4",
   "deepseek-v4-flash-vision-exp",
-  "gpt-oss-20b",
-  "ling-3.0-flash-sante",
-  "step-3.7-flash",
-  "claude-haiku-4.5",
   "mistral-nemo",
-  "gpt-4o-mini",
+  "ling-3.1-flash",
   "glm-5.3-flashx",
+  "gpt-oss-20b",
   "gemini-3.5-flash-lite",
-  "gpt-6-luna-pro",
+  "minimax-m2.7",
+  "gpt-4o-mini",
+  "claude-haiku-5.5",
+  "claude-haiku-4.5",
   "claude-opus-4.7",
-  "claude-sonnet-4.5",
-  "kimi-k2.6"
+  "step-3.7-flash",
+  "claude-sonnet-4.5"
 ]
```

</details>

## Merge danger

This is a two-way door: it adds one new dev script and its test, writes no files, and is never wired into CI or publishing. A revert removes it completely. If it is wrong, the impact is limited to a misleading suggestion report that a human reviews before editing the list.

Co-authored-by: Ayaan Zaidi <[email protected]>
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.

1 participant