Repository navigation
🤖 feat: resolve Cursor model: fast agents through Explore and hint is_background - #7841
Conversation
A Cursor `model: fast` agent now maps to `ai.settingsBase: "explore"`, and every consumer of an agent's AI-settings chain applies it through one helper, applySettingsBaseChain: run and task-reawaken layers, the prompt-cache TTL (resolveAgentForStream's new agentAiSettingsChain), the agents.list descriptor aiLayers, and the renderer/ACP declared-base walks (through the new descriptor field aiSettingsBase). Tool policy keeps following `base`. A missing, self, cyclic or nested settings base is ignored with a warning (D26), and the descriptor then leaves aiSettingsBase out. `is_background: true` maps to `subagent.background_hint`, carried as the descriptor's backgroundHint, and the task tool's agent list marks the agent "[meant to run in the background (run_in_background=true)]" (D12). The task schema and its run_in_background default do not change. Cursor plugin RFC (rfc/20261030_cursor-plugin-support.md), PR 4. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$11.04`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=11.04 -->
Runs and agents.list read the settings base with one helper, chainSettingsBase (the closest hop of the read chain, as the merged frontmatter has it), and the renderer and ACP walks take the AI-settings base from aiSettingsBaseOf. The settings-base read and the listed agent's AI fields move into named functions, so no touched function grows past the CRAP gate's limits. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$13.74`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=13.74 -->
… walks agents.list leaves out disabled agents, so with Explore disabled the renderer's base map had ci-watcher -> explore and no explore -> exec: the walk stopped at Explore and dropped Exec's configured defaults, while a run resolves [explore, exec]. collectUnlistedAncestorHops adds the hops of each listed agent's resolved layers (aiLayers) through agents the list leaves out. getAgentAiSettingsBases (every renderer base map) and the ACP walk use it, and a listed agent's own base still wins. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$13.74`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=13.74 -->
--- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$19.22`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=19.22 -->
Delete comments that restate the code or a test's name, and keep the ones that carry a non-obvious why or a Cursor plugin RFC reference. Say "discovered" instead of "listed" where the settings-base map also holds disabled agents, which the list leaves out.
…agent parseAgentDefinitionMarkdown's foreign-keys test parses `is_background: true`, which PR 4 maps to `subagent.background_hint: true` (Cursor plugin RFC, D12). --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$22.27`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=22.27 -->
…ext sites Three sites carried the PR 4 behavior with no repo test that failed when the line broke (verifier finding F4): - a turn of an agent with `settingsBase: explore` sends Explore's 5m cache TTL under a global 1h (turnRequestBuilder passes agentAiSettingsChain); - the ACP resolver gives such an agent Explore's Settings model, not Exec's (its base map uses the settings base); - a derived agent that inherits `subagent.background_hint` gets the hint line in the task tool's agent list (turnContextAssembler sets backgroundHint from the resolved frontmatter). Each test fails when its line is broken in a scratch edit. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$25.22`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=25.22 -->
--- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$26.03`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=26.03 -->
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2dd7ccff36
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🟢 e2e stories (Haiku): 14 passed22 agent steps · 7 replayed from cache · 15 model calls · 46.4k tokens (24% cached) All 14 tests in 9 files
e2e 0.20.0 · 1m 10s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 8.0k tokens (22% cached) All 3 tests in 3 files
e2e 0.20.0 · 21.6s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 5.3s · 2 targets (web, phone) · run artifacts |
…gs bases Codex review round 1 on #7841: - ACP took each listed agent's base-merged aiDefaults as that agent's own definition layer, so an ordinary base's frontmatter model outranked the settings-base chain. It now takes each agent's own layer (aiLayers.targetDefinitionAiDefaults), as Settings > Tasks does. - A settings base whose read chain stops at a missing or cyclic base applied in a run (partial chain) but not in agents.list (which cannot resolve it). A run now ignores it as "missing" too. - docs/agents/index.mdx said Cursor model values other than aliases inherit and is_background is ignored. It now lists model: fast and is_background: true with their mappings, and the built-in docs skill is regenerated. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$26.03`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=26.03 -->
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eabac10f22
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…n uses Codex review round 2 on #7841: an agent card's Inherit model (which drives its thinking ladder and Pro gating) took the definition model from the base-merged aiDefaults. For a settings-base agent those still hold the ordinary bases a run replaces, so a project exec.md pin outranked Explore's Settings model. With agents.list aiLayers, the card now asks the shared resolver (resolveInheritedLayerModel), which ranks each layer's Settings and frontmatter as the backend does. Cards without layers keep the old walk. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$26.03`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=26.03 -->
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7cf8fbcbc2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…roken chains Codex review round 3 on #7841: - A global agent's settings base resolved a project agent of that ID, while its ordinary base skips project agents. Runs and agents.list now read the settings base as the declaring hop's `base` would be read (computeBaseSkipScope). agents.list does one scoped read per settings-base agent instead of reusing the listed (winning) definition, which also covers a disabled settings base. ACP takes the target's aiLayers, so it gets the same chain. - An agent whose own chain stops at a missing or cyclic base kept its settings base in a run but had none in agents.list. applySettingsBaseChain now ignores a settings base when either chain is incomplete (reason "incomplete"), and decides "self" by ID before the read. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$26.03`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=26.03 -->
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 137525afdf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Pausing the review loop (AGENTS.md early-stop case 2: the loop does not converge). Codex code-review rounds 1 to 4 each found new P2s in one area: keeping the settings-base chain the same in runs, Two review rounds remain in this PR's budget. I asked the stack owner how to proceed before the next push. |
Test / Storybook (App/Chat/Input AutoModelRoutingKeyboard) failed on every head of #7841: Enter on the Auto row did not show Auto. The React Compiler memoizes resolveAutoRouting and resolveWorkspaceAiSelection on their arguments, but both read module-level picks. Callers used to pass a fresh base map each render, which defeated the memo. getAgentAiSettingsBases is memoized on agents, so the result went stale. useAutoRouting and useWorkspaceAiSelection now pass the useSyncExternalStore version as an input, so a pick re-resolves. Also names reasoning mode in the docs row for Cursor model: fast (Codex review round 4): a fast agent takes every AI setting of Explore's layers. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$48.63`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=48.63 -->
|
Resuming the review loop at efcbb1f. Round 4 outcome:
|
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…ns (coder#7844) ## Summary Settings > Plugins now reads `.cursor-plugin/marketplace.json` beside `.claude-plugin/marketplace.json` and shows one merged list. A name in both files appears once, with "Preview Cursor build" and "Preview Claude build". A Cursor entry installs through its own folder's manifest with the new `cursor-plugin` method. The install preview, the update review and the installed plugin card list every part Xum does not apply. Adding github.com/cursor/plugins goes from 2 listed plugins to 128, and all 128 Cursor builds can install. ## Background PR 2 of the Cursor plugin RFC (`rfc/20261030_cursor-plugin-support.md`, docs PR coder#7829): section "PR 2", Technical Plan section 3, decisions D20 and D23. It sits on PR 4 (coder#7841) in the Cursor stack. PR 1 (coder#7837) reads the Cursor manifest, rules and agents; this PR makes such plugins reachable from the marketplace and shows what they do not apply. ## Implementation - **Parser** (`claudeMarketplace.ts`): one reader for both files (`parseClaudeMarketplace(content, file)`), per-file caps (8 MiB, 500 entries), and diagnostics that name the file. `mergeMarketplaces` lists the Cursor entries in file order, then each Claude name the Cursor file lacks; a shared name gets both builds, Cursor first. Entries with a shape problem never merge. A Cursor path source starts at the marketplace root with or without `./` (cursor/plugins lists `third_party/attio`), under the same containment checks; the Claude rule is unchanged. - **Install service**: the listing reads both files. A broken file beside a good one becomes a warning; a read error waits for the manifest guard, so a root plugin still previews. The guard also covers `cursor-plugin` (a root `.cursor-plugin/plugin.json` previews the plugin, not a listing). Each build keeps its own status and skill count. One `{file, entry}` value flows through read, stage, install and update. - **Install methods**: `detectInstallMethods` returns `cursor-plugin` for a Cursor-only folder (a Claude manifest still wins, and a schema-less root `plugin.json` yields, D21). A Cursor entry whose folder has no manifest is refused. `cursor-marketplace` is a preview selector only; install never gets it back, and no install record stores a method. - **Payloads** (`agentPlugins.ts`): per-file `builds` on listing rows, `notApplied` on the preview, update review and list item, `ruleType` on rule skills, `readonlyAgents` on the preview. - **Renderer**: one row per name with per-build lines and actions; a shared not-applied list in the preview, update review and plugin card; rule-skill labels; "edit tools removed, shell still available" for agents that Xum maps to Explore. ## Validation - Dev-server sandbox, oRPC and agent-browser against github.com/cursor/plugins at 4dd1d05818 (re-checked on this head after merging `cursor-plugins/fast-agents`): 128 rows, 0 warnings; pstack and origin-apps have two builds; all 128 Cursor folders have a manifest and none is refused; attio (`third_party/attio`) and cursor-team-kit install through their Cursor builds. cursor-team-kit's review lists 18 skills, 2 rule skills labeled "always-apply rule, loaded on request in Xum", 2 agents and 4 not-applied fields. At 390 px the Plugins tab and the review have no horizontal scroll. Screenshots follow in a comment. - `tests/bugbash/repros/cursorMarketplaceMerge.e2e.ts` (`BUGBASH_AI=mock`) passes on web and phone, and fails with `ASSERTION_FAILED` on "Preview Claude build" when the Cursor file is ignored. - New unit and service tests cover the merge order, caps, diagnostics, Cursor path rule, install methods, update through the folder's own manifest, collision refusal, notApplied, rule types, readonly labels and invisible-character marks. ## Risks - Behavior change for every user of the Plugins tab: a repository with both marketplace files now lists both (release note below). Repositories with only a Claude file list as before. - The merged listing reads one more file per marketplace preview. A broken Cursor file beside a good Claude file only adds a warning. - Medium area of risk: install, preview and update of marketplace entries. Claude marketplace behavior is unchanged and covered by the existing marketplace tests. ## Release note Adding a repository with both marketplace files shows one merged list. `cursor/plugins` goes from 2 entries to 128. (Users of the Plugins tab, D20.) ## Deviations from the RFC 1. `chooseUpdateMethod` changed although RFC 2.3 says it needs no change (Codex RFC round 4 finding 3): with no marker, an update accepts `claude-plugin` or `cursor-plugin`; with a `claude-marketplace` marker it also accepts `cursor-plugin`, because this PR makes `cursor-plugin` an own method. 2. RFC 2.5 asks for a per-agent readonly label but 2.4 adds no field: the preview gains `readonlyAgents`. Only an agent that the Claude Code or Cursor mapping runs on Explore for `readonly: true` gets the label; a Xum-format agent never does. 3. A Cursor entry whose folder has only a Claude manifest installs as `claude-plugin` (RFC 2.3 lists three own methods; 2.2's refusal text names two). None of the 128 entries has this shape. 4. Cursor path sources resolve from the marketplace root without `./`, and a Cursor file ignores `metadata.pluginRoot`. The RFC said the Cursor file uses the Claude format; the real file needs Cursor's own path rule. 5. `parseClaudeMarketplace` takes the file kind instead of a relative path, and `marketplaceListing` takes the parsed files; a read error of one file counts like a parse error. ## Follow-ups - The plugin card does not show component warnings (for example an MCP server refused for a reason other than a not-applied one). The install preview and the update review show them. - Entries with `minClientVersions.cursor: "never"` are listed; Cursor hides them. - An update review with no capability change but a non-empty not-applied list applies at once, as today; the parts then show only on the card. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `xhigh` • Cost: `$28.91`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=xhigh costs=28.91 -->
Summary
A Cursor plugin agent with
model: fastnow resolves its AI settings (model, thinking level and Anthropic prompt-cache TTL) through Explore, at every place Xum reads an agent's AI settings. A Cursor agent withis_background: truegets the hint "[meant to run in the background (run_in_background=true)]" in thetasktool's agent list. Tool policy keeps followingbase, and thetaskschema and itsrun_in_backgrounddefault do not change.Background
ThomasK33 asked for the Cursor plugin RFC (
rfc/20261030_cursor-plugin-support.md) to land as a reviewed PR stack. This is RFC PR 4 (section "PR 4", section 7 "Agents", decisions D11, D12, D26, D27, CUJ 2, success check 3).Before this PR, Cursor's
fastmodel alias mapped to nothing, socursor-team-kit/ci-watcherand similar agents ran on Exec's Settings model, then the parent model. Cursor runs these agents on a small, fast model. Explore is Xum's model slot for short read-heavy sub-agent runs, so afastagent now takes Explore's Settings (then Explore's base, Exec, then the parent model, as an Explore sub-agent does).Implementation
pluginAgentFormat.ts:model: fastwrites the new optional frontmatter fieldai.settingsBase: "explore", andis_background: truewritessubagent.background_hint: true. Both fields are in the mapped frontmatter, so the consent fingerprint covers them: each installed agent that sets them asks for consent once after this update. Claude'sbackgroundfield stays ignored.applySettingsBaseChain(src/common/utils/ai/agentAncestorLayers.ts) is the one rule every consumer uses: the agent's own same-ID entries, then the settings-base agent's read chain. A settings base that is missing, the agent itself, inherits from the agent, or sets a settings base of its own ("nested") is ignored with asettingsBase ignoredwarning, and the agent resolves as without it (D26). Xum follows one settings base, never a second.loadAgentDefinitionAiLayersviaresolveAgentAiSettingsChain;resolveAgentForStreamreturnsagentAiSettingsChain, whichturnRequestBuilderandcontinuousCompactionSummarypass toresolveChainAgentCacheTtl(agentInheritanceChainkeeps its meaning for tool policy and capability checks);agents.list: descriptoraiLayersover the applied chain, and a new descriptor fieldaiSettingsBasethat is set only when the settings base applies;aiSettingsBase ?? base(aiSettingsBaseOf,getAgentAiSettingsBases).backgroundHintrides on the descriptor (agents.listand the tool-context descriptors fromturnContextAssembler), andbuildTaskDescriptionprints the hint.Deviations from the RFC text
resolveAgentAiSettingsChain(agentId, chain, context)reads the settings base from the closest hop of the read chain (chainSettingsBase), the value the base-merged frontmatter has. The RFC readagentDefinition.frontmatter, which is unmerged: an inherited settings base would then apply inagents.listbut not in a run.agents.listuses the same helper.getAgentAiSettingsBases, so afastagent's child workspace shows the model a run uses.agents.listleaves disabled agents out, so with Explore disabled the renderer walk stopped at Explore and lost Exec's defaults.collectUnlistedAncestorHopsadds the hops of each listed agent's resolvedaiLayersthrough agents the list leaves out. It is used bygetAgentAiSettingsBasesand ACP. A listed agent's own base still wins. Side effect: an ordinarybasethrough a disabled agent now also reaches its further bases in the renderer, as a run already does.agentResolution.test.ts, which computeseffectiveToolPolicy.aiLayers.targetDefinitionAiDefaults) instead of its base-mergedaiDefaults, as Settings > Tasks already does, so an ordinary base's frontmatter cannot outrank the settings-base chain. For agents without a settings base this also stops ACP from ranking a base's frontmatter above that base's Settings, which matches a run.agents.listalready did.docs/agents/index.mdx(and the generated built-in docs skill) listmodel: fastandis_background: truewith their new mappings. The rest of the Cursor docs stay in RFC PR 9.aiLayers(resolveInheritedLayerModel), not from the base-mergedaiDefaults, which still hold the bases a settings base replaces. Cards without layers keep the old walk.basewould be read (computeBaseSkipScope), so a global agent's settings base skips project agents.agents.listtherefore does one scoped read per settings-base agent (the RFC planned no extra reads), and ACP takes the target'saiLayers. A settings base is also ignored (reasonincomplete) when the agent's own chain or the settings base's chain stops at a missing or cyclic base, sinceagents.listcannot resolve those.Test / Storybookfix:useAutoRoutinganduseWorkspaceAiSelectionpass the AI-selection store version into their resolvers. The React Compiler memoizes those resolvers on their arguments, and a memoized base map (getAgentAiSettingsBases) left an Auto pick stale.Validation
agentAncestorLayers.test.ts(new),resolveNodeAgentAiSettings.test.ts,agentResolution.test.ts,agentDefinitionsService.test.ts(descriptor list through the renderer resolver),workspaceModeAi.test.ts,pluginAgentFormat.test.ts,task.test.ts,aiService.test.ts(wire-level prompt-cache TTL of a settings-base agent, and the inherited hint in the task description), andsrc/node/acp/resolveAgentAiSettings.test.ts(new). The guards for the nested rule, the unlisted hops, the TTL call site, the ACP map and the tool-context hint each fail when their line is broken in a scratch edit.cursor-team-kitinstalled unmanaged (Explore = Haiku 5.5 and Exec = Sonnet 5.5 in Settings). An Exec chat on Sonnet 5.5 spawnedci-watcher:modelId), with a 5-minute cache TTL on all 12 cache marks. The parent sent 1 hour.- ci-watcher: Watch PR CI … [meant to run in the background (run_in_background=true)].Risks
ai.settingsBase, which only the Cursor mapping writes, plus the renderer fill for chains through a disabled agent (deviation 3) and ACP's per-layer defaults (deviation 5). Tool policy does not read the new fields.fastoris_backgroundagent asks for consent once after this update (fingerprint change).ai.settingsBaseandsubagent.background_hint(.strip()schemas) and resolve as before.Release note
RFC section 8 has no row for PR 4: it changes nothing for users without a Cursor plugin. For Cursor plugin users: an agent with
model: fastuses Explore's model, thinking level and prompt-cache TTL from Settings (then Exec's, then the parent's). An agent withis_background: trueis marked "meant to run in the background" in the task tool's agent list. Installed agents with either field ask for consent once.Follow-ups (not in this PR)
fastagent (base: ci-watcher) drops thefastagent's own layers, because the settings-base chain follows the target's own entries (RFC 4.3 rule 5). All consumers agree.collectUnlistedAncestorHops), and ordinary scope-skipping bases diverge the same way. Fix: the renderer walks read each target's resolvedaiLayers.base. They need React rendering.Stack: RFC PR 4, based on #7838 (PR 3,
cursor-plugins/mcp).Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:xhigh• Cost:$48.63