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 登入。

本頁目錄