claude-code - 💡(How to fix) Fix [FEATURE] Pre-fill the model on claude.ai/code via URL parameter

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • If the value isn't in the account's allowed list (availableModels), surface the same error the picker would, rather than silently falling back.

Fix Action

Fix / Workaround

Workarounds I've considered:

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.

Code Example

https://claude.ai/code?prompt=...&repositories=acme/web&model=claude-opus-4-7[1m]
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • 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:

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 model to .claude/settings.json in 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.

https://claude.ai/code/session_01CvvhLmtSHwXRkBaJgdYZMQ

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING