Skip to content

Codex in Slack and Linear: delegate issues to cloud tasks

Codex’s Slack and Linear integrations start a Codex cloud task from a @Codex mention in a Slack thread, from a Linear issue delegated to Codex, or from a Linear triage rule, and post progress and results back to the same thread or issue. The work runs in a Codex cloud environment, so the result is only as trustworthy as that environment’s tests and the pull request gates behind it.

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 feed the same machinery. A mention or delegation creates a Codex cloud task (OpenAI’s docs call it a “cloud chat”), Codex picks the cloud environment that matches the repository named in the request, the agent works in that container, and Codex replies in the thread or issue with progress and a link to the task. From the task, you open a pull request like any other Codex cloud result.

Entry pointWho starts itContext Codex readsBest for
@Codex in a Slack channel or threadAnyone in a channel where the app is presentThe message and the thread historyBugs 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 Slack, Linear, and cloud pages as read on 2026-08-28. The host was not reachable for a re-check on 2026-09-26, so 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: Codex either replies that no environment fits, 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 and create at least one cloud environment per repository you want to delegate to. 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. In Codex settings, open Connectors and install the Slack app for your workspace.
  4. Add @Codex to the channels where delegation is allowed. Slack offers to add it the first time someone mentions it in a new channel.
  5. In the same Connectors page, install Codex for Linear.
  6. Link your Linear account by mentioning @Codex in a comment on any Linear issue.

Mention @Codex with the request in any channel or thread where the app is present. Codex reacts to acknowledge the message, starts a cloud task, and replies with a link. When the task completes, it posts the result in the thread, unless a workspace admin has restricted the app to posting links only.

Codex reads the whole thread, so you do not need to paste the traceback again. What it cannot infer is the repository, the file, and the definition of done. Name all three in the message that mentions it.

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.

Codex chooses the environment that best matches the request. When you name a repository, it uses the environment that contains that repository. When the request is ambiguous, it falls back to the environment you used most recently. When nothing fits, it replies with instructions instead of starting work. To correct a wrong choice, reply in the thread with the environment you want, for example acme/billing-api (staging), and mention @Codex again.

The cheapest habit is to always put owner/repo in the first message. The fallback to “most recently used” is correct for one-repository teams and wrong for everyone else.

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?”

Codex does not respond to a mention. The app is missing from the channel, the workspace install is incomplete, or your Slack, GitHub, or Linear connection is not confirmed. Codex usually replies with a reconnect link when a connection is missing. Recovery: add @Codex to the channel, check Connectors in Codex settings, and for Linear, mention @Codex once in any comment to link your account.

Codex runs in the wrong environment. The request named no repository, so Codex used the most recent environment. Recovery: reply in the thread with the correct owner/repo and environment, mention @Codex again, and discard the first task.

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. Codex reads the history, but the key detail may sit 50 messages up. Recovery: restate the repository, the symptom, and the acceptance criteria in the message that mentions @Codex.

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. By default Codex posts results in the thread. Recovery: ask a workspace admin to restrict the Slack app to posting task links only, 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”