[FEATURE] Pre-fill the model on claude.ai/code via URL parameter
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I run a GitHub Actions workflow that, on every issues.assigned event for a particular bot account, posts a claude.ai/code launch link pre-filled with the issue context as the prompt and the relevant repositories pre-selected. This uses the documented pre-fill parameters (prompt, repositories) and works well.
The launched session inherits whatever model is the signed-in user's account default — currently Opus 4.8 on Max/Team/Enterprise plans per the model-config docs. I want the sessions spawned from this workflow to pin a specific model (Opus 4.7, in my case — I'm sticking to 4.7 deliberately for the time being) regardless of what the user has configured globally, so the entire fleet of issue-triggered sessions runs on the same model.
There is no documented way to do this from the launch URL. The pre-fill spec lists only prompt / prompt_url / repositories / environment. I tried adding &model=claude-opus-4-7[1m] to the URL anyway — it's silently ignored.
The only documented model overrides for cloud sessions are:
ANTHROPIC_MODELenv var, which has to be set per-environment in the claude.ai/code UI — not driveable from a URL or workflow./modelslash command, which explicitly does not work in cloud sessions.
So an external integration that programmatically launches sessions cannot control which model those sessions run on. That's the gap.
Proposed Solution
Add a model query parameter to the claude.ai/code pre-fill URL, accepting the same values as ANTHROPIC_MODEL and --model: model aliases (opus, sonnet, opus[1m]) or full model names (claude-opus-4-7, claude-opus-4-7[1m], claude-opus-4-8).
https://claude.ai/code?prompt=...&repositories=acme/web&model=claude-opus-4-7[1m]
Behavior:
- If the param is present and the value is valid for the signed-in account, the spawned session uses that model.
- If the value isn't in the account's allowed list (
availableModels), surface the same error the picker would, rather than silently falling back. - The user can still switch models post-spawn the normal way.
This mirrors the existing precedence in the CLI (--model flag overrides ANTHROPIC_MODEL); the URL param fills the missing slot for cloud sessions.
Alternative Solutions
Workarounds I've considered:
- Per-environment
ANTHROPIC_MODEL: forces every consumer of the workflow to manually create + name an environment in the UI with the model pre-pinned, then I'd pass&environment=<name>. Doesn't scale — each user has to do one-time UI setup, and the env doesn't travel with the launch link. - Commit
modelto.claude/settings.jsonin every repo in scope: works for cloud sessions but also pins local CLI sessions in those repos. Cross-cutting side effect for a per-launch concern. - Issue-body instructions to switch models manually: defeats the point of an automation.
None of these are clean. A model URL param is the natural fix and matches the shape of the other pre-fill params already in the spec.
Priority
Medium — workaround exists (each user manually sets their default to 4.7) but it doesn't scale across a team or a fleet of issue-triggered sessions. For my workflow specifically, the inability to pin from the URL means every assignment-triggered session silently runs on whatever the clicker's default is, which makes "stick to 4.7 for the time being" a per-user discipline rather than a workflow-level guarantee.
Additional context
- Use case is the COO-on-assign workflow at coo-labs/coo-harness/.github/workflows/coo-on-assign-reusable.yml — open source, illustrates the URL-builder pattern.
- The general shape (org-internal workflow that spawns cloud sessions in response to GitHub events) is increasingly common as teams adopt Claude Code on the web for autonomous task execution; the model gap will keep coming up.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗