v0.1.16 released Project roots can now be created directly from the CLI, Feishu admin commands, and MCP, and spaced natural-language project switches are fixed. View Release →
Feishu × Codex CLI Project-aware control plane

Route Feishu into Codex's control plane.

Codex Feishu sends Feishu messages into resumable Codex CLI sessions. Project binding sticks by chat_id, local sessions can be adopted, shared repos are serialized safely, queued runtime state stays visible inside Feishu, and final replies now land as cleaner single-result rich text or cards, paired with direct natural-language commands and MCP access for external tools.

chat_id project binding /session adopt project.root lock queued visibility HTTP/SSE MCP single-result reply cards capability ACLs
Install / First Run latest on npm
$ npm install -g codex-feishu
$ codex-feishu init --mode global
$ export FEISHU_APP_ID=cli_xxx
$ export FEISHU_APP_SECRET=***
$ codex-feishu doctor --remote
 codex-feishu start
 codex-feishu status
Run State Preview same repo, no race
Processing status: queued
Project:           repo-a

This repository is being operated by
another chat. Queued with 1 task ahead.
Blocking status:   running
Sticky Routing Switch once in a group and the whole chat keeps the same project.
Session Adoption Adopt live Codex sessions from ~/.codex/sessions.
MCP Surface Expose the bridge to OpenClaw and other MCP clients.
Binding Project choice sticks to the chat

DMs and groups each keep their own current project until explicitly changed.

Resume Resume bridge or adopt local sessions

The bridge can continue its own sessions and take over native Codex CLI sessions from local state.

Queue Queue key plus repo-root lock

Runs stay serialized within a project thread and across chats pointing to the same project.root.

Surface Wiki, Docs, Base, Tasks, and runtime state

Knowledge search, native Feishu objects, and visible run state share one control path instead of scattered links and manual updates.

Access viewer / operator / admin

Project visibility, session control, and service changes are gated by minimum role instead of a single global switch.

Before a Feishu message reaches Codex, it passes through project, session, and runtime control.

01

Messages enter a sticky project layer first

The bridge resolves the current chat's project binding before execution. It does not re-guess the repository every turn.

Project Routing
02

Session continuity is explicit

If a project already has an active session, it resumes. If not, /session adopt latest can attach the closest local Codex session.

Session Control
03

Repo concurrency is blocked before damage

If another chat is already operating the same repository root, the new run is surfaced as queued instead of racing silently.

Runtime Guard
04

Codex runs inside explicit boundaries

Project root, sandbox, shell, pre-exec, timeout, and runtime policy remain visible and configurable.

Codex Runner
05

The control plane remains after the reply

Audit logs, metrics, run state, session history, and card actions remain available, with archive cleanup and project-level isolation for ongoing operations.

Observability

Two transport modes covering personal development to team production.

Recommended for personal use

long-connection

Connects via the official SDK WebSocket long connection. No public callback URL required, ideal for local development and personal use.

  • No public HTTPS URL needed
  • Fast setup, simple configuration
  • Supports text, rich text, and card replies
Card button callbacks require switching to webhook mode
Recommended for team deployment

webhook

Connects via Feishu event subscriptions and card callbacks. Ideal for shared team services and production deployments with full feature support.

  • Full event and card callback support
  • Supports card button interactions
  • Easy to extend and monitor
Requires a public HTTPS URL

These are the capabilities that make Feishu-driven Codex work practical for real projects.

Project Routing

/project <alias> changes the active project for the current chat

Switch once in a group and everyone in that group inherits the same project until it is changed again.

Session Adoption

/session adopt latest|list|<thread_id>

Feishu can now attach to native Codex CLI sessions instead of only sessions previously persisted by the bridge.

Auto Adopt

Project switch can auto-connect the latest local session

With project_switch_auto_adopt_latest = true, project switching prefers the chat's existing session and otherwise adopts the latest matching local one.

Runtime Discipline

queue key plus project.root locking

Project threads do not overlap, and separate chats cannot mutate the same repository in parallel.

Wiki & Knowledge

Full Feishu wiki read/write access

Supports /wiki search, read, create, rename, copy, move, and membership management; /kb search for local project docs.

MCP Surface

Support both stdio and HTTP/SSE MCP

Run codex-feishu mcp to expose projects, project switching, session adoption, run state, config history, and natural-language control commands to OpenClaw and other MCP clients, with rotating Bearer tokens for remote access.

Memory System

Project memory and group shared memory

Supports /memory save/search/pin/forget/restore, SQLite + FTS5 retrieval, configurable TTL, pin overflow strategy, and background cleanup.

Observability

Audit logs, probes, and Prometheus metrics

Built-in /healthz, /readyz, and /metrics with Alertmanager and Grafana integration. Data stays local and inspectable.

Access Roles

Add session / run / config / service capability lists on top of roles

Project visibility, session control, run execution, config mutation, service observation, and service restarts can be granted separately as teams grow.

Admin Control

Admin control plane and dynamic configuration

Use /admin commands to dynamically manage admins, group allow-lists, project config, config history snapshots, and one-click rollback.

This is the shortest path from installation to a real Feishu-to-Codex round-trip.

CLI install and bootstrap
# Install
npm install -g codex-feishu
codex-feishu init --mode global

# Check
codex-feishu doctor
codex-feishu doctor --remote

# Start
codex-feishu start
codex-feishu logs --follow
codex-feishu create-project repo-new /srv/codex/repo-new
codex-feishu mcp
Feishu switch, adopt, continue
# Project management
/projects
/project repo-a
/admin project create repo-new /srv/codex/repo-new

# Session management
/session adopt latest
/session list

# Natural language commands
Switch to project repo-a
Adopt latest session
Show detailed status
Release Surface
  • npm Install directly with npm install -g codex-feishu
  • GitHub Release Tagged builds produce synchronized tgz assets
  • GitHub Pages The site remains pure static HTML/CSS
  • Docs README, docs, and workflows describe the same current behavior

Everything you need to install, learn, update, and get support is linked here.

Turn Feishu into a manageable, resumable, production-ready entry point for Codex work.

Built for teams that need project routing, session continuity, concurrency guardrails, and visible runtime state.