Prerequisites
- A Lark or Feishu account
- A Lark bot app with an App ID and App Secret — create one at open.feishu.cn (Feishu) or the equivalent Lark developer portal
You need the App ID, App Secret, and a chat ID (the target group or direct message to post into). The chat ID is available in the Lark app URL or via the Lark API.
Setup
Create a Lark bot app
Go to open.feishu.cn and create a new app. Enable the Receive messages and Send messages capabilities. Note the App ID and App Secret from the app credentials page.
Enter App ID and App Secret
Paste the App ID and App Secret from your Lark app. Codeg saves them to the OS keyring — they are never written to disk or logged.
Configure event filters
Choose which events this channel should receive: turn completions, tool calls, errors, or permission requests.
Enable daily report (optional)
Toggle Daily Report on and set the delivery time to receive an automated daily coding summary.
Available commands
Send these commands to your Lark bot. The default prefix is/; you can change it in Settings → Chat Channels → Command Prefix.
| Command | Description |
|---|---|
/folder | Pick a project directory |
/agent | Choose an AI agent |
/task <description> | Create a session and start a task |
/resume [ID] | Resume the most recent session, or a specific session by ID |
/cancel | Abort the current running task |
/sessions | List active sessions in the current folder |
/approve | Approve a pending permission request |
/approve always | Approve and auto-approve future requests of the same type |
/deny | Deny a pending permission request |
/search <keyword> | Search conversation history (returns up to 10 results) |
/today | View today’s coding activity summary |
/status | Show connection status for all configured channels |
/help | Display available commands |
Message format
Codeg sends Lark messages using a card-based layout. Cards provide structured rich formatting native to the Lark platform:- A header section with the message title and level indicator
- Body text with the main content
- Key-value fields for structured data (agent type, stop reason, error details)
Token refresh
Lark tenant access tokens expire periodically. Codeg refreshes the token automatically in the background (with a 5-minute margin before expiry) so the connection stays active without any manual intervention.Event filters
Control which events Lark delivers to this channel:- Turn complete — agent finishes a response turn
- Tool calls — agent invokes a tool (file read, shell command, etc.)
- Errors — agent or channel errors
- Permission requests — agent pauses to request approval
Troubleshooting
“Authentication failed” on connect Verify the App ID and App Secret are correct and that the app is published or in the correct environment (development vs. production). Re-enter the credentials from the Lark developer portal. Messages are not delivered to the chat Confirm that the chat ID configured in the channel settings matches the target group or direct message. The bot must be a member of the target chat. WebSocket connection drops Codeg automatically reconnects on WebSocket disconnections. Check Settings → Chat Channels for the current connection status. If status showserror, click Reconnect.