Skip to content

🤖 feat: resolve Cursor model: fast agents through Explore and hint is_background - #7841

Merged
ThomasK33 merged 12 commits into
cursor-plugins/mcpfrom
cursor-plugins/fast-agents
Oct 31, 2026
Merged

ThomasK33 merged 12 commits into
cursor-plugins/mcpfrom
cursor-plugins/fast-agents

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Summary

A Cursor plugin agent with model: fast now 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 with is_background: true gets the hint "[meant to run in the background (run_in_background=true)]" in the task tool's agent list. Tool policy keeps following base, and the task schema and its run_in_background default 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 fast model alias mapped to nothing, so cursor-team-kit/ci-watcher and 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 a fast agent now takes Explore's Settings (then Explore's base, Exec, then the parent model, as an Explore sub-agent does).

Implementation

  • pluginAgentFormat.ts: model: fast writes the new optional frontmatter field ai.settingsBase: "explore", and is_background: true writes subagent.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's background field 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 a settingsBase ignored warning, and the agent resolves as without it (D26). Xum follows one settings base, never a second.
  • Consumers:
    • runs and task reawaken: loadAgentDefinitionAiLayers via resolveAgentAiSettingsChain;
    • the prompt-cache TTL: resolveAgentForStream returns agentAiSettingsChain, which turnRequestBuilder and continuousCompactionSummary pass to resolveChainAgentCacheTtl (agentInheritanceChain keeps its meaning for tool policy and capability checks);
    • agents.list: descriptor aiLayers over the applied chain, and a new descriptor field aiSettingsBase that is set only when the settings base applies;
    • the renderer and ACP: every declared-base map uses aiSettingsBase ?? base (aiSettingsBaseOf, getAgentAiSettingsBases).
  • backgroundHint rides on the descriptor (agents.list and the tool-context descriptors from turnContextAssembler), and buildTaskDescription prints the hint.

Deviations from the RFC text

  1. 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 read agentDefinition.frontmatter, which is unmerged: an inherited settings base would then apply in agents.list but not in a run. agents.list uses the same helper.
  2. The renderer has 6 more base maps than RFC 4.9 lists (WorkspaceModeAISync, ChatInput twice, useSendMessageOptions twice, ThinkingContext) plus the TasksSection model walk. All use getAgentAiSettingsBases, so a fast agent's child workspace shows the model a run uses.
  3. RFC review round 5: agents.list leaves disabled agents out, so with Explore disabled the renderer walk stopped at Explore and lost Exec's defaults. collectUnlistedAncestorHops adds the hops of each listed agent's resolved aiLayers through agents the list leaves out. It is used by getAgentAiSettingsBases and ACP. A listed agent's own base still wins. Side effect: an ordinary base through a disabled agent now also reaches its further bases in the renderer, as a run already does.
  4. The "tool policy is unchanged" test lives in agentResolution.test.ts, which computes effectiveToolPolicy.
  5. Codex round 1: ACP now takes each listed agent's own definition layer (aiLayers.targetDefinitionAiDefaults) instead of its base-merged aiDefaults, 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.
  6. Codex round 1 (and verifier F2): a settings base whose read chain stops at a missing or cyclic base is ignored as "missing" in a run too, as agents.list already did.
  7. Codex round 1: docs/agents/index.mdx (and the generated built-in docs skill) list model: fast and is_background: true with their new mappings. The rest of the Cursor docs stay in RFC PR 9.
  8. Codex round 2: a Settings > Tasks card's Inherit model (its thinking ladder and Pro gating) comes from the shared resolver over the descriptor's aiLayers (resolveInheritedLayerModel), not from the base-merged aiDefaults, which still hold the bases a settings base replaces. Cards without layers keep the old walk.
  9. Codex round 3: the settings base is read the way the declaring hop's base would be read (computeBaseSkipScope), so a global agent's settings base skips project agents. agents.list therefore does one scoped read per settings-base agent (the RFC planned no extra reads), and ACP takes the target's aiLayers. A settings base is also ignored (reason incomplete) when the agent's own chain or the settings base's chain stops at a missing or cyclic base, since agents.list cannot resolve those.
  10. Test / Storybook fix: useAutoRouting and useWorkspaceAiSelection pass 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

  • Unit and real-instance tests: 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), and src/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.
  • Dogfood in a dev-server sandbox with cursor-team-kit installed unmanaged (Explore = Haiku 5.5 and Exec = Sonnet 5.5 in Settings). An Exec chat on Sonnet 5.5 spawned ci-watcher:
    • The sub-agent ran on Haiku 5.5 (header, composer and the request's modelId), with a 5-minute cache TTL on all 12 cache marks. The parent sent 1 hour.
    • The parent's request listed - ci-watcher: Watch PR CI … [meant to run in the background (run_in_background=true)].
    • Settings > Tasks shows ci-watcher's prompt cache as "Inherit (5 minutes)" (Explore's), next to "Inherit (1 hour)" for an Exec-based agent.

Sub-agent report on Haiku 5.5 from a Sonnet 5.5 parent

ci-watcher child workspace on Haiku 5.5

Settings > Tasks: ci-watcher inherits Explore's 5-minute prompt cache

Risks

  • Low. The new behavior applies only to agents with 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.
  • Each installed Cursor fast or is_background agent asks for consent once after this update (fingerprint change).
  • Downgrade: older builds strip ai.settingsBase and subagent.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: fast uses Explore's model, thinking level and prompt-cache TTL from Settings (then Exec's, then the parent's). An agent with is_background: true is 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)

  • F3 (verifier, Low): an agent derived from a fast agent (base: ci-watcher) drops the fast agent's own layers, because the settings-base chain follows the target's own entries (RFC 4.3 rule 5). All consumers agree.
  • Renderer walks keyed by agent ID (Codex round 4): the renderer's base map holds one base per agent ID, so two listed agents that reach the same unlisted agent at different scopes share one hop (collectUnlistedAncestorHops), and ordinary scope-skipping bases diverge the same way. Fix: the renderer walks read each target's resolved aiLayers.
  • Renderer-map tests: the WorkspaceModeAISync, ThinkingContext, useSendMessageOptions, ChatInput and TasksSection maps have no test that fails when one goes back to base. They need React rendering.
  • Settings > Tasks shows "Inherit" for every inheriting agent's model and never names the inherited model. An "Inherit (model)" label is new UI outside this PR.

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

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 -->
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T16:57:40.706889Z efcbb1f Manual request
🔒 Security Review ✅ Completed 2026-10-31T16:57:39.410349Z efcbb1f Manual request
ℹ️ About Codex in GitHub

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

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

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

@ThomasK33
ThomasK33 added this pull request to stack #7836 October 31, 2026 15:13

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 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".

Comment thread src/node/acp/resolveAgentAiSettings.ts Resolved
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e stories (Haiku): 14 passed

22 agent steps · 7 replayed from cache · 15 model calls · 46.4k tokens (24% cached)
Spend: $0.09 of the $1.00 cap (proxy ledger)

All 14 tests in 9 files
Test Agent Time
🟢 chatRestart.e2e.ts · 1 passed 1 step · 1 call 5.1s
🟢 a chat survives a restart of the server 1 step · 1 call 5.1s
🟢 compaction.e2e.ts · 1 passed 1 step · 1 call 4.5s
🟢 /compact replaces the old chat with a summary 1 step · 1 call 4.5s
🟢 pluginTrustRestart.e2e.ts · 1 passed 4 steps · 2 calls 9.7s
🟢 a trusted plugin hook stays trusted after the server restarts 4 steps · 2 calls 9.7s
🟢 settingsRoundTrip.e2e.ts · 1 passed 2 steps · 1 call 8.5s
🟢 a chat survives trips through Settings 2 steps · 1 call 8.5s
🟢 sidebarPerWorkspace.e2e.ts · 1 passed 4 steps · 1 call 5.5s
🟢 a new workspace starts with its right sidebar collapsed while another keeps it open 4 steps · 1 call 5.5s
🟢 smoke.e2e.ts · 1 passed 2 steps · 1 call 2.3s
🟢 the agent opens the playground workspace 2 steps · 1 call 2.3s
🟢 streamErrors.e2e.ts · 1 passed 1 step · 1 call 6.5s
🟢 stream errors show in the chat, and the chat recovers 1 step · 1 call 6.5s
🟢 todoNudge.e2e.ts · 1 passed 1 step · 1 call 2.5s
🟢 the agent finishes open TODO items after the turn-end nudge 1 step · 1 call 2.5s
🟢 touchAlignment.e2e.ts · 6 passed 6 steps · 6 calls 22.8s
🟢 the Settings close button is level with the title on a touch screen 390px wide 1 step · 1 call 4.2s
🟢 the Settings close button is level with the title on a touch screen 768px wide 1 step · 1 call 3.9s
🟢 Backup settings checkboxes are small and level with their labels on a touch phone 1 step · 1 call 4.6s
🟢 the heartbeat checkbox is small and level with its label on a touch phone 1 step · 1 call 3.0s
🟢 a reply's model and time stay on one line on a touch phone 1 step · 1 call 2.9s
🟢 the workspace actions menu stays on the title row on a touch phone 1 step · 1 call 4.3s

e2e 0.20.0 · 1m 10s · web · run artifacts

🟢 e2e Electron stories (Haiku): 3 passed

3 agent steps · 3 model calls · 8.0k tokens (22% cached)
Spend: $0.02 of the $1.00 cap (proxy ledger)

All 3 tests in 3 files
Test Agent Time
🟢 electron/deepLink.e2e.ts · 1 passed 1 step · 1 call 8.6s
🟢 a deep link of a second launch starts a chat in the running app 1 step · 1 call 8.6s
🟢 electron/menuBar.e2e.ts · 1 passed 1 step · 1 call 5.5s
🟢 the workspace menu bar is the desktop title bar 1 step · 1 call 5.5s
🟢 electron/smoke.e2e.ts · 1 passed 1 step · 1 call 5.2s
🟢 Xum Electron opens the playground workspace 1 step · 1 call 5.2s

e2e 0.20.0 · 21.6s · electron · run artifacts

🟢 e2e agent repros (Haiku): no tests selected

Spend: $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 -->

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 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 -->

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 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 -->

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 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".

@ThomasK33

Copy link
Copy Markdown
Member Author

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, agents.list, the renderer walks and ACP (3, 1, 2 and 2 findings). Every finding up to round 3 is fixed and resolved. Round 4's renderer finding needs the renderer's AI-settings walks to use each agent's resolved ancestry instead of an ID-keyed base map, which is a redesign. Round 4's reasoning-mode finding is intended per the RFC and needs only a docs wording change.

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 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

Resuming the review loop at efcbb1f. Round 4 outcome:

  • Reasoning-mode finding: intended per the RFC; the docs row now names reasoning mode.
  • ID-keyed renderer walk finding: deferred to a tracked follow-up (renderer walks should read each target's resolved aiLayers); see the PR description.
  • Also fixed: Test / Storybook (AutoModelRoutingKeyboard) failed on every head of this PR. The React Compiler memoized the AI-selection resolvers on their arguments, so a stable base map left Auto stale. The hooks now pass the store version as an input.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

Head: efcbb1f

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: efcbb1fe19

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: efcbb1fe19

ℹ️ 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".

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 83462da Oct 31, 2026
34 of 35 checks passed
@ThomasK33
ThomasK33 deleted the cursor-plugins/fast-agents branch October 31, 2026 23:09
yermakoffivan pushed a commit to yermakoffivan/mux that referenced this pull request Nov 1, 2026
…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 -->
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