跪拜 Guibai
← Back to the summary

Bifrost Turns Feishu Into a Remote Console for OpenAI Codex

Use Feishu Bot to Keep Codex Online 24/7: Assign Tasks to Your AI Engineer Anytime, Anywhere

Many people are already used to working with Codex at their computer: open the terminal, enter the repository, describe the requirement, and wait for it to read code, modify files, and run tests.

But engineering problems don't only appear when you're sitting at your computer.

What I want is not another chatbot, but a remote work entry point truly connected to the development environment: send a message from my phone, and Codex on my home or office computer can start working in the correct repository, with execution progress continuously reported back to Feishu, and the ability to ask follow-up questions after the task is complete.

Bifrost's IM Gateway is prepared precisely for this scenario.

How It Works

The entire chain is not complicated:

Feishu Private Chat / Group Chat
    ↓
Bifrost IM Gateway
    ↓
Codex Runner
    ↓
Local Repository, Terminal, Git, Tests, and Installed Skills

Feishu handles "anytime, anywhere," Codex handles understanding and executing engineering tasks, and Bifrost handles stably connecting the two sides.

It does not simply forward a Feishu message to the command line. Bifrost maintains sessions, working directories, task queues, and Runner bindings, organizing Codex's plans, tool calls, phase progress, and final results into Feishu cards. Each group chat has independent context, preventing discussions from Project A from bleeding into Project B.

The "24/7 online" mentioned here is not magical cloud hosting: the computer running Bifrost and Codex must remain powered on, connected to the network, and must not enter deep sleep that would interrupt processes. You can place it on an always-on Mac mini, a development machine, or your own server.

Step 1: Keep Bifrost Running Persistently

After installing Bifrost and Codex, first confirm both are available locally:

bifrost --version
codex --version

Then start Bifrost in background mode:

bifrost start -d
bifrost status

If you want it to automatically recover after a reboot, you can add Bifrost to the system's login startup items or service manager. There are only two key points: the Bifrost process runs continuously, and Codex has been properly configured on this machine.

Step 2: Bind Feishu to Codex

Bifrost provides an interactive Feishu connection process. The shortest command only requires a Provider name, platform type, and Runner:

bifrost im provider add feishu-main --type feishu --runner codex

The command will output an authorization URL and QR code, and wait for you to confirm in Feishu. After authorization is complete, Bifrost will automatically create and connect the Provider, and the bot will send an online notification and available command help.

If you already have your own Feishu application, you can also reference the Secret using environment variables to avoid writing keys into shell history:

export FEISHU_APP_SECRET='your app secret'

bifrost im provider add feishu-main \
  --type feishu \
  --app-id cli_xxx \
  --secret env:FEISHU_APP_SECRET \
  --owner-open-id ou_xxx \
  --runner codex

After the Provider successfully comes online, send this in Feishu:

/status

You should see the current Runner, session status, and working directory.

Step 3: Switch the Session to the Correct Repository

The biggest fear when assigning tasks remotely is the Agent working in the wrong directory. Bifrost maintains an independent working directory for each session, which can be viewed and switched directly in Feishu:

/pwd
/cwd /Users/you/work/my-project

After switching, you can first send a read-only task to verify the environment:

Please read the AGENTS.md and README of this repository, only analyze, do not modify files.
Tell me the main modules of the project, test entry points, and the current git status.

Once confirmed, you can assign real tasks just like in the Codex desktop or CLI:

Fix the issue where the user list keeps showing loading when data is empty.
First locate the root cause, add regression tests, run related tests after completion, and send me a change summary.
Do not skip the delivery requirements of the existing AGENTS.md.

Codex still uses the original local repository, Git identity, toolchain, and project rules. Feishu is just an entry point; it will not copy your project into a stripped-down "chat version development environment."

Not Just the Final Answer: Watch Full Execution Progress on Your Phone

What's needed most for long tasks is not a single "processing" message, but assessable progress.

Bifrost continuously updates plans, tool executions, and phase results onto Feishu cards. You can see which modules Codex is reading, what tests are being executed, and whether it's encountering blocks, without opening a remote desktop to stare at the terminal.

Commonly used session commands include:

/help            View commands supported by the current channel
/status          View Runner and session status
/pwd             View working directory
/cwd <path>      Switch the working directory of the current session
/q               View current thread queue
/rq              View recoverable queues/tasks
/stop            Stop current execution
/runner          View current Runner
/models          View available models
/efforts         View available reasoning effort
/fast status     View Codex Fast status

Which specific model or reasoning effort commands are displayed depends on the capabilities of the current Codex Adapter. Bifrost will not fake a "success" when something is unsupported.

Private Chat and Group Chat: Give Each Project Its Own Agent Entry Point

For personal use, chatting directly with the bot is most straightforward; for team collaboration, you can add the bot to project groups.

Bifrost maintains an independent Session Key, context cursor, Runner, and working directory for each group. You can have the "release group" permanently bound to the release repository, and the "client group" bound to the App repository, without interference.

In group chats, ordinary messages by default only enter the context ledger and do not trigger the model with every sentence. Processing is only actually started when explicitly @mentioning the bot, sending /g, /q, or slash commands. This preserves necessary discussion background while avoiding the Agent being frequently awakened by chat spam.

For example, after an online issue discussion concludes, directly send:

@Bifrost Please check the corresponding implementation in the repository based on the discussion above, first provide the root cause and a minimal fix plan, do not modify immediately.

After confirming the plan, continue:

Implement according to this plan, add unit tests and E2E, submit a PR after completing two rounds of review, and follow up on CI.

This is much smoother than copying chat records to the computer, re-explaining the context, and manually starting the Agent.

Turn Fixed Work into Scheduled Tasks

In addition to message triggering, the IM Gateway also supports schedules. For example, have Codex summarize traffic and anomalies every day at 9 AM:

bifrost im target add oncall \
  --receive-id-type chat_id \
  --receive-id oc_xxx

bifrost im schedule add agent-daily \
  --target oncall \
  --cron '0 9 * * *' \
  --agent-prompt 'Check agent traffic for the last 24 hours, summarize error trends and anomalies requiring attention, do not modify any configuration.' \
  --agent-runner-id codex \
  --agent-model gpt-5 \
  --agent-reasoning-effort high

The same mechanism can also be used for CI summaries, dependency update checks, pre-release inspections, and project daily reports. The output of scheduled tasks will be sent back to the specified Feishu target, without you needing to manually send the same prompt every day.

Keeping "Always Ready to Assign Tasks" Secure

Remotely controlling an engineering Agent is convenient, but it also means boundaries need to be set carefully.

My suggestions are:

  1. Use restricted permissions by default. Do not configure all tasks as danger-full-access just for convenience.
  2. Bind different repositories to different groups. Use /cwd to explicitly define the work scope; do not let all sessions share a broad directory.
  3. Use environment variable references for sensitive values. Feishu Secrets and Tokens should not be written into command history, articles, or repositories.
  4. Keep manual confirmation. High-risk actions like publishing, deleting, and production changes should still require Agent confirmation before execution.
  5. Analyze first, then modify. For unfamiliar issues, first issue a read-only diagnostic task, and authorize implementation only after confirming the plan.
  6. Let project rules continue to take effect. Maintain clear AGENTS.md, tests, and commit requirements in the repository; the remote entry point will also comply with them.

"24/7 online" should not equal "24/7 unlimited permissions." A stable remote Agent relies on constant reachability, continuous context, transparent status, and clear authorization boundaries.

Finally

After connecting Feishu to Codex, my most noticeable feeling is: many things that previously had to "wait until I'm back at the computer" can now be immediately queued.

When an idea strikes, let it analyze first; when an alert arrives, let it collect evidence first; continue watching tests and CI when away from the computer; send /stop when you need to pause. The computer remains the complete engineering execution environment, while the phone becomes a portable task control console.

Bifrost is an open-source project, repository address:

https://github.com/bifrost-proxy/bifrost

If you are also using Codex, Claude Code, or Trae, you can try connecting your always-on development machine to the IM Gateway. The next time inspiration or a failure strikes, you don't have to wait until you're back at your computer; just assign the task directly in Feishu.