Skip to content

ChatGPT in Slack and Codex’s Linear integration start a Codex cloud task from a @ChatGPT mention in a Slack thread (with Cloud delegation enabled), from a Linear issue delegated to Codex, or from a Linear triage rule, and post results back to the thread or issue. The work runs in a Codex cloud environment, so the result is only as trustworthy as its tests and pull request gates.

A customer reports in #support that invoice PDFs show the wrong tax for Canadian addresses. Your PM files a Linear issue, an engineer picks it up two days later, and spends the first hour finding the right file. This page is for the developer who wants that bug to arrive as a tested pull request instead, and for the tech lead who decides which issues may be delegated and who signs off on the result.

What you get from wiring Codex into Slack and Linear

Section titled “What you get from wiring Codex into Slack and Linear”
  • A setup order for both integrations that avoids the most common silent failure: no matching cloud environment.
  • Five copy-paste prompts: a scoped Slack fix, an investigate-first Slack thread, a Linear issue template Codex can finish, an investigate-then-fix comment pair, and a local Linear MCP prompt.
  • A triage-rule policy that decides which issues Codex may take, and who remains accountable.
  • A verification path that proves a delegated change works without anyone reading the whole diff.

How a Slack message or Linear issue becomes a pull request

Section titled “How a Slack message or Linear issue becomes a pull request”

Both integrations end in the same machinery. In Slack, ChatGPT takes the request and, with Cloud delegation enabled, sends the repository work to a separate Codex Cloud task and returns the result to the thread. In Linear, a delegation or mention creates a Codex cloud task (OpenAI’s docs call it a “cloud chat”) and Codex replies in the issue with progress and results. The work runs in a Codex cloud environment. From the task, you open a pull request like any other Codex cloud result.

Entry pointWho starts itContext Codex readsBest for
@ChatGPT in a Slack channelAnyone who can mention ChatGPT in that channelThe request in Slack; repository work goes to a Codex Cloud task through Cloud delegationBugs reported in conversation, quick investigations
Delegating a Linear issue to CodexAnyone who can assign in the teamThe issue title, description, and commentsWell-specified tickets with acceptance criteria
@Codex in a Linear commentAnyone on the issue, even when a human owns itThe issue plus the comment threadAsking for an investigation or a second attempt
Linear triage rule set to delegate to CodexAutomatic, for every issue matching the ruleSame as delegationHigh-volume, low-risk bug classes
Linear MCP in a local sessionYou, in the Codex CLI, IDE extension, or desktop appWhatever issues the agent fetchesLocal work that starts from a ticket

These product details come from OpenAI’s “Use ChatGPT in Slack”, Linear, and cloud pages as read on 2026-10-12; the Linear page is unchanged since 2026-08-28. Confirm menu names in your own workspace.

Set up the cloud environment before either integration

Section titled “Set up the cloud environment before either integration”

Both integrations fail quietly without a usable environment: the task either does not start or runs in the wrong one. Build the environment first, and make sure it can run your test suite, because the tests are what make a delegated change verifiable. Codex cloud environments covers setup scripts, caching, secrets, and the agent’s internet policy.

  1. Connect GitHub to Codex. For Slack, create a cloud environment for each repository you want to delegate to, let Codex prepare and test it, publish it, and share the published environment with the workspace. For Linear, set the environment up the legacy way: OpenAI says Codex Cloud (Legacy) “continues to support environments for Code Review and the Linear and GitHub integrations” (OpenAI’s cloud environment page, checked 2026-10-12), and Codex cloud environments covers that setup. Confirm that one task started from the Codex web UI runs your tests to green.
  2. Put the test, lint, and type-check commands in the repository’s AGENTS.md, so every cloud task runs them without being asked. See AGENTS.md for Codex.
  3. Follow OpenAI’s “Use ChatGPT in Slack” page to add ChatGPT to your Slack workspace and enable Cloud delegation.
  4. Decide in which channels people may mention @ChatGPT for repository work, and tell them to name owner/repo in the first message.
  5. In Codex settings, open Connectors and install Codex for Linear.
  6. Link your Linear account by mentioning @Codex in a comment on any Linear issue.

Mention @ChatGPT with the request in a Slack channel. With Cloud delegation enabled, ChatGPT sends the repository work to a separate Codex Cloud task and returns the result to the thread.

Do not count on ChatGPT to infer the repository, the file, and the definition of done. Name all three in the message that mentions it, even when the traceback is already in the thread.

For a bug report from a support channel, ask for findings before a fix. The thread then holds an analysis the team can check before any code exists, and you continue the same conversation to approve the fix.

Cloud delegation needs a published Codex environment that is shared with the workspace (OpenAI’s Slack page, checked 2026-10-12). Without one, repository work cannot go to a Codex Cloud task. OpenAI’s Slack page does not describe how to redirect a task that was delegated with the wrong repository or environment (checked 2026-10-12), so do not rely on a reply in the thread to steer it: discard the task and start a new request that names owner/repo.

The cheapest habit is to always put owner/repo in the first message, so the request never depends on a guess.

Delegate an issue to Codex the way you assign one to a teammate, and Codex posts progress and results to the issue. Linear’s own model helps here: “issues can only be assigned to humans, and only delegated to agents”, so the issue keeps a human assignee who is accountable for the result while Codex does the work (Linear, “Our approach to building the Agent Interaction SDK”, 2025-08-01). Keep that pattern. The human assignee is the person who signs off.

An issue Codex can finish has the same shape as an issue a new team member could finish: expected and actual behaviour, where to look, and a testable definition of done.

Mention @Codex in a comment when the issue already belongs to someone, or when you want an investigation before code. Follow-up comments continue the same task.

Route new issues to Codex with Linear triage rules

Section titled “Route new issues to Codex with Linear triage rules”

A triage rule turns delegation from a decision into a default, so the rule is a policy, not a convenience. Start narrow, and widen only when the delegated pull requests keep passing review.

  1. In Linear, open the team’s settings and turn Triage on.
  2. Under Triage rules, add a rule whose action delegates to Codex.
  3. Add filters so the rule matches only the class of work you trust Codex with, for example the label bug and priority Low or Medium.
  4. File a test issue that matches the rule and confirm Codex picks it up and posts to the issue.
Route to Codex by ruleKeep with a person
Reproducible bugs in one service with a failing test you can describeFeatures that need a product decision
Dependency bumps and small refactors the test suite fully coversCross-service or schema changes
Copy, config, and lint-class fixesAnything touching auth, billing logic, or data deletion
Issues with a written “Done when” listIssues whose description is one line

Verify delegated work without reading every line

Section titled “Verify delegated work without reading every line”

A pull request from Slack or Linear gets the same gates as any other change, and those gates, not a line-by-line read, are the proof. Set them up once and the review becomes a check of evidence.

  1. Acceptance criteria in the request. The “Done when” list in the issue or the Slack message is the contract. The reviewer checks each item against the task summary and the tests, not against the diff.
  2. Tests run inside the cloud task. Because AGENTS.md names the test commands, the agent runs them and the task summary should report whether they ran and passed. A summary with no test run is a failed task, whatever the diff looks like.
  3. CI on the pull request. The same required checks as a human pull request: tests, lint, type check, and any security scan. Delegated pull requests get no exemptions.
  4. An automated review pass. Comment @codex review on the pull request, or enable automatic reviews, so a second agent checks the change against your review rules. See Codex code review.
  5. A human sign-off on evidence. The Linear assignee, or the person who asked in Slack, approves the pull request after reading the summary, the test output, and the review findings. They read code only where the review flags a concern or the change touches a risky path.

To reproduce a result locally before approving, pull the task’s diff with the Codex CLI (codex cloud is marked experimental in 0.157.1):

Terminal window
codex cloud list --limit 5 # find the task ID
codex cloud diff TASK_ID # show the unified diff
codex cloud apply TASK_ID # apply it to your working tree, then run the tests

Replace TASK_ID with the identifier from codex cloud list or the task link in Slack or Linear.

Give local Codex sessions Linear and Slack context with MCP

Section titled “Give local Codex sessions Linear and Slack context with MCP”

The integrations above run in the cloud. When you work locally in the Codex CLI, IDE extension, or desktop app, connect Linear’s official remote MCP server so the agent can read an issue and its comments instead of you pasting them. Run this in a terminal:

Terminal window
codex mcp add linear --url https://mcp.linear.app/mcp
codex mcp login linear

Or add the server to ~/.codex/config.toml and then run codex mcp login linear:

[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"

The curated plugin installs the same server in one step: codex plugin add linear@openai-api-curated. The marketplace name openai-api-curated is what codex plugin list prints in 0.157.1. Its sibling slack@openai-api-curated connects Slack’s remote MCP server (https://mcp.slack.com/mcp), which lets a local session read or summarise a channel. Codex MCP setup covers MCP configuration in general, and Jira and Linear MCP integration compares the issue-tracker servers across tools.

What breaks when Codex runs from Slack and Linear?

Section titled “What breaks when Codex runs from Slack and Linear?”

Repository work does not start after a mention. In Slack, Cloud delegation is off for the workspace or no published environment is shared with it, so ChatGPT cannot send repository work to a Codex Cloud task. In Linear, your account may not be linked or confirmed. Recovery: for Slack, check both in OpenAI’s “Use ChatGPT in Slack” setup and mention @ChatGPT again; for Linear, mention @Codex once in any comment to link your account, and check Connectors in Codex settings.

The task runs in the wrong environment. A likely cause is a request that named no repository. OpenAI’s Slack page does not say how ChatGPT chooses one, or how to redirect a delegated task (checked 2026-10-12). Recovery: discard the task and start a new request that names the right owner/repo, with @ChatGPT in Slack or @Codex in a Linear comment.

The fix targets the wrong branch. A cloud task may start from a branch other than the one you meant, and the environment decides which branch it uses. Recovery: name the branch in the request (“apply this on release/2026-10”) and check the pull request’s base branch before you approve.

The pull request passes CI but misses the point. The issue had no testable definition of done, so Codex satisfied the literal words. Recovery: close the pull request, rewrite the issue with a “Done when” list, and re-delegate. Treat repeat offenders as an issue-template problem, not a model problem.

Context gets lost in a long thread. The key detail may sit 50 messages up. Recovery: restate the repository, the symptom, and the acceptance criteria in the message that mentions @ChatGPT.

A triage rule floods Codex with issues it cannot finish. The rule matches too broadly. Recovery: disable the rule, narrow it by label and priority, and re-enable it. Review the last batch of delegated pull requests before you widen it again.

A triage-started task fails for some reporters and not others. Tasks started by a rule run under the issue creator’s account, which may lack access to the repository. Recovery: grant that person Codex access to the environment, or file such issues from an account that has it.

Customer text in a support channel tries to steer the agent. Anything in the thread is input to the task, including a pasted message that says “ignore previous instructions”. Recovery: keep the environment’s agent internet access off unless the task needs it, keep secrets out of the agent phase, and let only CI and the review gates decide what merges.

Code snippets appear in a channel they should not. ChatGPT returns the result to the thread it was mentioned in. Recovery: restrict delegation to channels with the right audience, ask a workspace admin which output controls your setup has, and see Codex enterprise governance for the rest of the data controls.

Where to go next from Slack and Linear delegation

Section titled “Where to go next from Slack and Linear delegation”