﻿---
title: "Slack 里 @Codex 要写清仓库，否则会落到最近用过的环境"
summary: "Cloud 聊天。线程上文会被读进去。选错环境就在同一条线程写清 owner/repo 再 @ 一次。"
category: cloud
level: starter
surfaces: [cloud]
tags: ["Slack", "@Codex", "Cloud"]
canonical: /tips/slack-at-codex-env/
---

# Slack 里 @Codex 要写清仓库，否则会落到最近用过的环境

Cloud 聊天。线程上文会被读进去。选错环境就在同一条线程写清 owner/repo 再 @ 一次。

先接通 Cloud 环境和 Slack 应用，再把 `@Codex` 拉进频道：

```text
@Codex fix the above in openai/codex
```

它会匹配你能用的环境；含糊时用最近一次。聊天打在该环境 repo map 的第一个仓库的默认分支。选错了，回：`Please run this in owner/repo`，再 `@Codex`。

长线程把关键约束写在最后一条，不要指望它翻完整个频道。企业工作区可关掉「任务完成后把答案贴回 Slack」，那时线程里只留聊天链接。`@Codex` 会带上消息和线程历史，按机密频道处理。

## 来源

- [OpenAI · Use Codex in Slack](https://learn.chatgpt.com/docs/third-party/slack)
