Conversation
) renderForCursor was the one renderer that dropped spec.model: Claude, the Codex family and Copilot all write the agent's model into their native file, and reverseFromCursor reads it back (COMMON_CURSOR_FIELDS whitelists it), so a team agent with a concrete model ran on Cursor's default model silently. Tencent#830's design notes name the gap ('Cursor drops model when it renders agents today') and ask for it as a separate change — this is that change: write the value verbatim, as the other renderers do. The model[effort=...] form stays with the alias proposal.
|
No findings. The PR description documents sufficient testing, including a representative real-CLI verification at head commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Cursor half of #830's open question "Cursor drops
modelwhen it renders agents today" as the separate change that note asks for. It does not touch alias resolution — themodel[effort=...]form belongs to the alias proposal, still open there.Problem
renderForCursorwas the one renderer that droppedspec.model. Every other renderer writes the agent's declared model into its native file — Claude (frontmatterData['model']), the Codex TOML family, Copilot (json['model']) — andreverseFromCursorreads it back (COMMON_CURSOR_FIELDSwhitelistsmodelas a common field, not a tool extra). So the team repo can declare a model, every other tool receives it, and the Cursor copy silently runs on Cursor's default model.Real CLI, sandbox HOME, team repo with one agent declaring
model: claude-opus-4,teamai pull --forceonmain@84d8ba7:The model is gone. The asymmetry also runs the other way: a Cursor agent file that carries a
modelparses it back into the spec, so the render and the reverse disagree about the same field.Fix
renderForCursorwritesmodelverbatim when the spec declares one, exactly like the other renderers:modelis still omitted when the spec has none, so specs without a model render byte-identically to before. No alias resolution, no effort form — a concrete value crosses as-is, which is what the reverse already expects.Tests
src/__tests__/agent-format.test.ts, in therenderForCursordescribe:model: claude-opus-4into the frontmatter;model:when the spec has none (guards the byte-identical path);reverseFromCursorwithout loss.Suite: 73/73 in
agent-format.test.ts(was 70), and the agent delivery suites (agents,doctor-agents-delivery,pull-agents-cleanup,copilot-agents,builtin-agents) all pass — 89/89.npx tsc --noEmitclean;npm run lint0 warnings under--deny-warnings.Real-CLI verification (
6089aa2)npm run build, thennode dist/index.js pull --forceagainst a sandboxHOME(.cursor/present) and a local team-repo fixture whoseagents/code-reviewer.yamldeclaresmodel: claude-opus-4. The only variable is the CLI build:Before (main) — model dropped (record above). After (this branch):
Docs: the Cursor section of
docs/usage-guide.md(and.zh-CN.md) gained one sentence naming the subagent frontmatter fields, which it did not enumerate before.