📚AI 编程官方教程中文版
官方教程中文版团队与集成

从 Linear 使用 Codex

你可以在 Linear 中使用 Codex,把 issues 里的工作交给它处理。

你可以在 Linear 中使用 Codex,把 issues 里的工作交给它处理。

把 issue assign 给 Codex,或在 comment 中 mention @Codex,Codex 就会创建 cloud task,并回复 progress 和 results。

Codex in Linear 适用于 paid plans,见 Pricing

如果你使用 Enterprise plan,请让 ChatGPT workspace admin 在 workspace settings 中打开 Codex cloud tasks,并在 connector settings 中启用 Codex for Linear

Set Up the Linear Integration

  1. 先设置 Codex cloud tasks:在 Codex 中连接 GitHub,并为你希望 Codex 工作的 repository 创建 environment
  2. 打开 Codex settings,为 workspace 安装 Codex for Linear
  3. 在 Linear issue 的 comment thread 中 mention @Codex,以 link 你的 Linear account。

Delegate Work to Codex

你可以用两种方式把工作交给 Codex。

Assign an Issue to Codex

安装 integration 后,你可以像 assign 给 teammates 一样,把 issues assign 给 Codex。

Codex 会开始工作,并把 updates 发回 issue。

截图:

Mention @Codex in Comments

你也可以在 comment threads 中 mention @Codex,用来 delegate work 或 ask questions。

Codex 回复后,可以继续在同一 thread 中 follow up,延续同一个 session。

截图:

Codex 开始处理 issue 后,会 choose an environment and repo 作为工作位置。

如果要固定到某个具体 repo,请写在 comment 里,例如:

@Codex fix this in openai/codex

跟踪 progress:

  • 打开 issue 的 Activity,查看 progress updates。
  • 打开 task link,查看更详细的执行过程。

task 完成后,Codex 会发布 summary 和 completed task link,方便你创建 pull request。

Codex 如何选择环境和仓库

  • Linear 会根据 issue context suggested repository。Codex 会选择最匹配该 suggestion 的 environment。若 request ambiguous,则 fallback 到你最近使用过的 environment。
  • task 会基于该 environment repo map 中列出的第一个 repository default branch 运行。如果你需要不同 default 或更多 repositories,请在 Codex 中更新 repo map。
  • 如果没有 suitable environment 或 repository,Codex 会在 Linear 中回复修复说明,你处理后再 retry。

Automatically Assign Issues to Codex

你可以通过 triage rules 自动把 issues assign 给 Codex:

  1. 在 Linear 中打开 Settings
  2. Your teams 下选择你的 team。
  3. 在 workflow settings 中打开 Triage 并启用它。
  4. Triage rules 中创建 rule,选择 Delegate > Codex,并设置其他需要的 properties。

进入 triage 的 new issues 会自动 assign 给 Codex。

使用 triage rules 时,Codex 会使用 issue creator 的 account 运行 tasks。

截图:

Data Usage, Privacy, and Security

当你 mention @Codex 或把 issue assign 给它时,Codex 会接收你的 issue content,用来理解 request 并创建 task。

data handling 遵循 OpenAI 的 Privacy PolicyTerms of Use 以及其他适用 policies

更多 security 信息,见 Codex security documentation

Codex 使用 large language models,可能出错。始终 review answers 和 diffs。

Tips and Troubleshooting

  • Missing connections:如果 Codex 无法确认你的 Linear connection,它会在 issue 中回复一个 account connection link。
  • Unexpected environment choice:在 thread 中回复你希望使用的 environment,例如 @Codex please run this in openai/codex
  • Wrong part of the code:在 issue 中添加更多 context,或在 @Codex comment 中给出明确 instructions。
  • More help:见 OpenAI Help Center

Connect Linear for Local Tasks (MCP)

如果你使用 Codex app、CLI 或 IDE Extension,并希望 Codex 在本地访问 Linear issues,请配置 Codex 使用 Linear Model Context Protocol (MCP) server。

更多信息见 Linear MCP docs

IDE extension 和 CLI 使用同一套 configuration,因此 MCP server 的 setup steps 相同。

如果已经安装 CLI,运行:

codex mcp add linear --url https://mcp.linear.app/mcp

这个命令会提示你 sign in with Linear account,并连接到 Codex。

Configure Manually

  1. 在 editor 中打开 ~/.codex/config.toml
  2. 添加下面配置:
[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"
  1. 运行 codex mcp login linear 登录。

On this page