> ## Documentation Index
> Fetch the complete documentation index at: https://cli.fuxicode.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Fuxi Code in Slack

> Delegate coding tasks directly from your Slack workspace

<Note>
  Fuxi Code in Slack is being replaced by [Fuxi Tag](https://fuxi.com/docs/fuxi-tag/overview) for Team and Enterprise workspaces. Fuxi Tag runs @Fuxi as your organization's shared identity with admin-configured access, under the same Slack app, so there is nothing to reinstall and existing setups continue to work during the transition. To switch a workspace, see [Migrate from the earlier Fuxi in Slack](https://fuxi.com/docs/fuxi-tag/admins/migrate-from-earlier).
</Note>

Fuxi Code in Slack brings the power of Fuxi Code directly into your Slack workspace. When you mention `@Fuxi` with a coding task, Fuxi automatically detects the intent and creates a Fuxi Code session on the web, allowing you to delegate development work without leaving your team conversations.

This integration is built on the existing Fuxi for Slack app but adds intelligent routing to Fuxi Code on the web for coding-related requests. Each session runs under your own Fuxi account, using your connected repositories and your plan limits.

## Use cases

* **Bug investigation and fixes**: Ask Fuxi to investigate and fix bugs as soon as they're reported in Slack channels.
* **Quick code reviews and modifications**: Have Fuxi implement small features or refactor code based on team feedback.
* **Collaborative debugging**: When team discussions provide crucial context (e.g., error reproductions or user reports), Fuxi can use that information to inform its debugging approach.
* **Parallel task execution**: Kick off coding tasks in Slack while you continue other work, receiving notifications when complete.

## Prerequisites

Before using Fuxi Code in Slack, ensure you have the following:

| Requirement            | Details                                                                                           |
| :--------------------- | :------------------------------------------------------------------------------------------------ |
| Fuxi Plan            | Pro, Max, Team, or Enterprise with Fuxi Code access (premium seats or Chat + Fuxi Code seats) |
| Fuxi Code on the web | Access to [Fuxi Code on the web](/en/fuxi-code-on-the-web) must be enabled                    |
| GitHub Account         | Connected to Fuxi Code on the web with at least one repository authenticated                    |
| Slack Authentication   | Your Slack account linked to your Fuxi account via the Fuxi app                               |

## Setting up Fuxi Code in Slack

<Steps>
  <Step title="Install the Fuxi App in Slack">
    A workspace administrator must install the Fuxi app from the Slack App Marketplace. Visit the [Slack App Marketplace](https://slack.com/marketplace/A08SF47R6P4) and click "Add to Slack" to begin the installation process.
  </Step>

  <Step title="Connect your Fuxi account">
    After the app is installed, authenticate your individual Fuxi account:

    1. Open the Fuxi app in Slack by clicking on "Fuxi" in your Apps section
    2. Navigate to the App Home tab
    3. Click "Connect" to link your Slack account with your Fuxi account
    4. Complete the authentication flow in your browser
  </Step>

  <Step title="Configure Fuxi Code on the web">
    Ensure your Fuxi Code on the web is properly configured:

    * Visit [fuxi.ai/code](https://fuxi.ai/code) and sign in with the same account you connected to Slack
    * Connect your GitHub account if not already connected
    * Authenticate at least one repository that you want Fuxi to work with
  </Step>

  <Step title="Choose your routing mode">
    After connecting your accounts, configure how Fuxi handles your messages in Slack. Navigate to the Fuxi App Home in Slack to find the **Routing Mode** setting.

    | Mode            | Behavior                                                                                                                                                                                                                                 |
    | :-------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Code only**   | Fuxi routes all @mentions to Fuxi Code sessions. Best for teams using Fuxi in Slack exclusively for development tasks.                                                                                                             |
    | **Code + Chat** | Fuxi analyzes each message and intelligently routes between Fuxi Code (for coding tasks) and Fuxi Chat (for writing, analysis, and general questions). Best for teams who want a single @Fuxi entry point for all types of work. |

    <Note>
      In Code + Chat mode, if Fuxi routes a message to Chat but you wanted a coding session, you can click "Retry as Code" to create a Fuxi Code session instead. Similarly, if it's routed to Code but you wanted a Chat session, you can choose that option in that thread.
    </Note>
  </Step>

  <Step title="Add Fuxi to channels">
    Fuxi is not automatically added to any channels after installation. To use Fuxi in a channel, invite it by typing `/invite @Fuxi` in that channel. Fuxi can only respond to @mentions in channels where it has been added.
  </Step>
</Steps>

## How it works

### Automatic detection

When you mention @Fuxi in a Slack channel or thread, Fuxi automatically analyzes your message to determine if it's a coding task. If Fuxi detects coding intent, it will route your request to Fuxi Code on the web instead of responding as a regular chat assistant.

You can also explicitly tell Fuxi to handle a request as a coding task, even if it doesn't automatically detect it.

<Note>
  Fuxi Code in Slack only works in channels (public or private). It does not work in direct messages (DMs).
</Note>

### Context gathering

**From threads**: When you @mention Fuxi in a thread, it gathers context from all messages in that thread to understand the full conversation.

**From channels**: When mentioned directly in a channel, Fuxi looks at recent channel messages for relevant context.

This context helps Fuxi understand the problem, select the appropriate repository, and inform its approach to the task.

<Warning>
  When @Fuxi is invoked in Slack, Fuxi is given access to the conversation context to better understand your request. Fuxi may follow directions from other messages in the context, so users should make sure to only use Fuxi in trusted Slack conversations.
</Warning>

### Session flow

1. **Initiation**: You @mention Fuxi with a coding request
2. **Detection**: Fuxi analyzes your message and detects coding intent
3. **Session creation**: A new Fuxi Code session is created on fuxi.ai/code
4. **Progress updates**: Fuxi posts status updates to your Slack thread as work progresses
5. **Completion**: When finished, Fuxi @mentions you with a summary and action buttons
6. **Review**: Click "View Session" to see the full transcript, or "Create PR" to open a pull request

## User interface elements

### App Home

The App Home tab shows your connection status and allows you to connect or disconnect your Fuxi account from Slack.

### Message actions

* **View Session**: Opens the full Fuxi Code session in your browser where you can see all work performed, continue the session, or make additional requests.
* **Create PR**: Creates a pull request directly from the session's changes.
* **Retry as Code**: If Fuxi initially responds as a chat assistant but you wanted a coding session, click this button to retry the request as a Fuxi Code task.
* **Change Repo**: Allows you to select a different repository if Fuxi chose incorrectly.

### Repository selection

Fuxi automatically selects a repository based on context from your Slack conversation. If multiple repositories could apply, Fuxi may display a dropdown allowing you to choose the correct one.

## Access and permissions

### User-level access

| Access Type          | Requirement                                                     |
| :------------------- | :-------------------------------------------------------------- |
| Fuxi Code Sessions | Each user runs sessions under their own Fuxi account          |
| Usage & Rate Limits  | Sessions count against the individual user's plan limits        |
| Repository Access    | Users can only access repositories they've personally connected |
| Session History      | Sessions appear in your Fuxi Code history on fuxi.ai/code   |

### Workspace-level access

Slack workspace administrators control whether the Fuxi app is available in their workspace:

| Control                      | Description                                                                                                       |
| :--------------------------- | :---------------------------------------------------------------------------------------------------------------- |
| App installation             | Workspace admins decide whether to install the Fuxi app from the Slack App Marketplace                          |
| Enterprise Grid distribution | For Enterprise Grid organizations, organization admins can control which workspaces have access to the Fuxi app |
| App removal                  | Removing the app from a workspace immediately revokes access for all users in that workspace                      |

### Channel-based access control

Fuxi is not automatically added to any channels after installation. Users must explicitly invite Fuxi to channels where they want to use it:

* **Invite required**: Type `/invite @Fuxi` in any channel to add Fuxi to that channel
* **Channel membership controls access**: Fuxi can only respond to @mentions in channels where it has been added
* **Access gating through channels**: Admins can control who uses Fuxi Code by managing which channels Fuxi is invited to and who has access to those channels
* **Private channel support**: Fuxi works in both public and private channels, giving teams flexibility in controlling visibility

This channel-based model allows teams to restrict Fuxi Code usage to specific channels, providing an additional layer of access control beyond workspace-level permissions.

## What's accessible where

**In Slack**: You'll see status updates, completion summaries, and action buttons. The full transcript is preserved and always accessible.

**On the web**: The complete Fuxi Code session with full conversation history, all code changes, file operations, and the ability to continue the session or create pull requests.

For Enterprise and Team accounts, sessions created from Fuxi in Slack are
automatically visible to the organization. See [Fuxi Code on the Web sharing](/en/fuxi-code-on-the-web#share-sessions)
for more details.

## Best practices

### Writing effective requests

* **Be specific**: Include file names, function names, or error messages when relevant.
* **Provide context**: Mention the repository or project if it's not clear from the conversation.
* **Define success**: Explain what "done" looks like—should Fuxi write tests? Update documentation? Create a PR?
* **Use threads**: Reply in threads when discussing bugs or features so Fuxi can gather the full context.

### When to use Slack vs. web

**Use Slack when**: Context already exists in a Slack discussion, you want to kick off a task asynchronously, or you're collaborating with teammates who need visibility.

**Use the web directly when**: You need to upload files, want real-time interaction during development, or are working on longer, more complex tasks.

## Troubleshooting

### "Fuxi Code is not enabled for your account"

This error means your Fuxi account has no cloud environment yet, not that an admin needs to enable anything. Sign in at [fuxi.ai/code](https://fuxi.ai/code) once with the same account you connected to Slack. The first visit creates your default cloud environment, and the error clears on your next mention. Each user must do this individually.

### Sessions not starting

1. Verify your Fuxi account is connected in the Fuxi App Home
2. Check that you have Fuxi Code on the web access enabled
3. Ensure you have at least one GitHub repository connected to Fuxi Code

### Repository not showing

1. Connect the repository in Fuxi Code on the web at [fuxi.ai/code](https://fuxi.ai/code)
2. Verify your GitHub permissions for that repository
3. Try disconnecting and reconnecting your GitHub account

### Wrong repository selected

1. Click the "Change Repo" button to select a different repository
2. Include the repository name in your request for more accurate selection

### Authentication errors

1. Disconnect and reconnect your Fuxi account in the App Home
2. Ensure you're signed into the correct Fuxi account in your browser
3. Check that your Fuxi plan includes Fuxi Code access

### Session expiration

1. Sessions remain accessible in your Fuxi Code history on the web
2. You can continue or reference past sessions from [fuxi.ai/code](https://fuxi.ai/code)

## Current limitations

* **GitHub only**: Currently supports repositories on GitHub.
* **One PR at a time**: Each session can create one pull request.
* **Rate limits apply**: Sessions use your individual Fuxi plan's rate limits.
* **Web access required**: Users must have Fuxi Code on the web access; those without it will only get standard Fuxi chat responses.

## Related resources

<CardGroup>
  <Card title="Fuxi Code on the web" icon="globe" href="/en/fuxi-code-on-the-web">
    Learn more about Fuxi Code on the web
  </Card>

  <Card title="Fuxi for Slack" icon="slack" href="https://fuxi.com/fuxi-and-slack">
    General Fuxi for Slack documentation
  </Card>

  <Card title="Fuxi Tag" icon="users" href="https://fuxi.com/docs/fuxi-tag/overview">
    Organization-managed @Fuxi in Slack with admin-configured access
  </Card>

  <Card title="Slack App Marketplace" icon="store" href="https://slack.com/marketplace/A08SF47R6P4">
    Install the Fuxi app from the Slack Marketplace
  </Card>

  <Card title="Fuxi Help Center" icon="circle-question" href="https://support.fuxi.com">
    Get additional support
  </Card>
</CardGroup>
