feat(coding-agent): add grok-4.6 prompt preset - #904
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
…t value list Co-authored-by: Cursor <cursoragent@cursor.com>
code-yeongyu
enabled auto-merge
August 16, 2026 16:00
…preset Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # packages/coding-agent/CHANGELOG.md # packages/coding-agent/src/core/extensions/builtin/prompt-preset/changes.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Grok 4.6 shipped in four built-in catalogs (xai, opencode, openrouter, vercel-ai-gateway) with no prompt preset — the grok-4.5 matcher deliberately excludes it, so it fell back to the untuned dynamic prompt. This adds a
grok-4.6preset as a full-core rewrite tuned per the Grok 4.6 launch field guide (Eric Zakariasson, 2026-08-12). It is a direct-implementer core, deliberately NOT a clone of the grok-4.5 CEO/orchestrator preset, which is a fork experiment specific to that model.Field-guide findings encoded in the core: exhortation phrasing ("work very hard") measurably changes nothing on this model while an explicit definition of "done" changes everything, so the routing line carries the binding declared-stop-condition contract and no intensity language; the single highest-leverage instruction is a real-surface verification loop (walk the user paths the change touches; for hard-to-inspect output: capture current state, list what is wrong, fix only those); its observed failure of repeating near-identical blocks across components gets one positive shared-piece rule; reporting is tuned information-dense (never restate the task, quiet through small changes, one short update at meaningful phase changes).
Changes
prompt-preset/grok-4.6.ts— new corePrompt preset (precedent: kimi-k3.ts / gpt-5.6.ts). ReusesbuildTestDisciplineSection(); nobuildFileOperationsTuning()becauseapply_patchis gated togpt-*ids and never activates on Grok.prompt-preset/presets.ts—hasGrok46Signalmatcher (the 4.5 regex shape with a 4.6 minor version), checked before the 4.5 matcher;resolvePresetNamebranch +buildPresetcase.prompt-preset/settings.ts—"grok-4.6"joinsPromptPresetName/VALID_PRESETS.docs/settings.md— preset value list gainsgrok-4.6and the previously missinggrok-4.5; fork trackers (prompt-preset/changes.md) and[Unreleased]changelog updated.test/suite/prompt-presets-grok-4-6.test.ts— id-shape resolution (12 shapes incl.x-ai/, colon-separated,grok-4p6,grok46, trailing tags), non-routing of 4.5/4.3/4.20/3/build-0.1/4.60, 4.5-vs-4.6 distinctness, settings force, and a catalog sweep asserting every built-in Grok 4.6 entry resolves.QA & Evidence
grok-4.6,grok-4.5, andgrok-4.3.~/.senpi/agent/auth.jsonuntouched.local-ignore/qa-evidence/20260817-grok-4-6-preset/(qa-run.log + per-model captured system prompts; local evidence dir, gitignored by design).prompt-presets-grok-4-5andprompt-presets-extensionsuites green; rootnpm run checkgreen. Full coding-agent suite: 7798 passed; 6 unrelated subprocess/timing tests failed under full-suite load and all pass in isolation.Risks & Residuals
grok-4.60does not match) and the 4.5/4.3/4.20 families are covered by negative tests — mitigated.Made with Cursor
Summary by cubic
Routes Grok 4.6 models to a new
grok-4.6system-prompt preset instead of the untuned dynamic prompt. Grok 4.6 now uses a direct-implementer core; Grok 4.5 stays on its CEO/orchestrator preset.grok-4.6.ts: full-core override viabuildDynamicSystemPromptwith a binding declared stop condition, real-surface verification loop, shared-piece rule to avoid repeated blocks, and dense reporting; reusesbuildTestDisciplineSection; noapply_patchreferences.hasGrok46Signaland routes it before 4.5; excludes 4.60 and other families; updatesresolvePresetName/buildPreset.PromptPresetName/VALID_PRESETSwith"grok-4.6"; documentsgrok-4.5andgrok-4.6indocs/settings.md; CHANGELOG and extension change log updated.Written for commit c2646d9. Summary will update on new commits.