create_pull_request_with_copilot: no way to specify which custom agent (or its model) a task runs with
还没有人认领这个 Issue。
评估
调研方向
从 create_pull_request_with_copilot 工具的实现开始,跟踪 @copilot 的 PR 评论 dispatch 路径,然后继续了解可用的自定义 agent 和 model 是如何解析的。定义 agent 选择输入,并验证命名 agent 声明的 model 是否得到遵循,或者显式 model fallback 是否有效。完成标准是两个 dispatch 路径都能选择请求的 agent,而无需后续运行。
由索引模型根据 Issue 内容生成。
描述
Feature request
create_pull_request_with_copilot has no way to specify which custom agent a task should run with. We would also like the agent's declared model to be honored, so that a dispatched task runs with the same agent and model as one started from github.com.
Current behavior
The tool accepts only owner, repo, problem_statement, title, base_ref.
With no agent specified, the runtime discovers our organization-level custom agent, lists it as available, and then proceeds without it:
Proceeding without custom agent.
Additional custom agents available: ppc-developer
The model is unset for the same reason, so the run falls back to the org base model regardless of which models the org has approved:
[cca-engine] Model resolution: env="auto" settings="sweagent-capi:gpt-5.3-codex" → resolved="gpt-5.3-codex"
env="auto" here is the tool's omission — there is no parameter that could have populated it.
What we're trying to do
We dispatch coding-agent tasks programmatically. Each task should run with our organization's custom agent (ppc-developer), which encodes repo-specific conventions and safety rules, on the model that agent is written for.
The runtime clearly supports both — it resolves a model per run, and it scans and lists available custom agents. But a dispatched task has no way to influence either.
This applies to @copilot PR comments too. We included the line "Must use the 'ppc-developer' agent to handle this request" in the comment body, and the run still logged Proceeding without custom agent — so prose in the request does not select an agent, and we could not find a syntax that does.
The only workaround we've found is to create the task and then post a follow-up comment to re-dispatch it, which spends an entire agent run doing nothing useful.
What we'd like
A way to name the custom agent when dispatching a task — for create_pull_request_with_copilot, and ideally for @copilot PR comments as well, since we use both. Resolved from the same agent sources the runtime already scans.
Naming the agent alone should be enough. We'd prefer not to pass a model separately in either path, because our .agent.md already declares one:
---
name: PPC Website Developer
description: Develops websites in the SK PPC style
model: Claude Opus 4.8
tools: [...]
---
Having the runtime use that as the model when an agent is named would keep the model with the rules it applies to, instead of duplicating it in every caller. We recognize this may not be straightforward — in the logs above, agent resolution and model resolution appear to happen in that order but independently, and the model: field seems to be honored only by editor clients today. If reading it server-side isn't practical, an optional model parameter alongside agent would also solve our problem. We'd defer to whichever fits the runtime's design.
Environment
- Copilot Business
- Organization-level custom agent at
agents/ppc-developer.agent.mdin the org.github-privaterepository - Agent confirmed discoverable by the runtime (listed as "available" in the log above)
claude-opus-4.8approved in the org's Copilot model settings, and observed resolving correctly on runs triggered from the PR (env="sweagent-capi:claude-opus-4.8")
- 主要语言
- Go
- 星标
- 33.1k
- 派生
- 5k
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 25
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/github-mcp-server 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
github/github-mcp-server#3235 ·
-
enhancement
难度 1/5 1 小时以内 新手友好度 88/100
github/github-mcp-server#3042 · 2 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
github/github-mcp-server#3032 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 74/100
github/github-mcp-server#2803 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
github/github-mcp-server#2740 ·
查看 github/github-mcp-server 的全部 Issue
相似的 Issue
-
textual definition
难度 1/5 1 小时以内 新手友好度 90/100
geneontology/go-ontology#32653 ·
-
难度 1/5 1 小时以内 新手友好度 75/100
-
needs design
难度 2/5 1-3 小时 新手友好度 75/100
-
Priority/High ready-for-agent Severity/Major Type/Bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100