Skip to content

Commit ee632a8

Browse files
denvenclaude
andcommitted
docs: describe the fork as covering both Codex and Claude Code
The fork now manages Claude Code sessions as well, but its docs still presented it as a Codex-only extension. - README / README.zh-CN: retitle to "Windows Session Remote Management Extension for Codex and Claude Code"; update the tagline, intro, section headings and ownership diagram; mark /windows as Codex-only; add the Claude flow to the typical workflow and the Claude profile and release-agent steps to build and install. - Move the screenshots back under "Remote session management". The previous commit had left them nested under "Claude Code sessions", though they show the Codex cards. - local-docs/README*.md were verbatim copies of an older root README, with every relative link broken from that directory. Replace them with the documentation index the root README already calls them. - local-docs/03: retitle to cover Claude Code, and say where its section lives. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent b2a46d8 commit ee632a8

6 files changed

Lines changed: 104 additions & 536 deletions

File tree

‎README.md‎

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# lark-channel-bridge — Windows Codex Session Remote Management Extension
1+
# lark-channel-bridge — Windows Session Remote Management Extension for Codex and Claude Code
22

33
**English** | [简体中文](./README.zh-CN.md)
44

5-
> A Windows-focused downstream extension of **`lark-channel-bridge`** for discovering and monitoring local Codex CLI sessions, safely transferring session ownership between Windows and Lark, and remotely managing multiple Codex sessions from Lark Mobile App or Lark Web.
5+
> A Windows-focused downstream extension of **`lark-channel-bridge`** for discovering and monitoring local **Codex CLI** and **Claude Code** sessions, safely transferring session ownership between Windows and Lark, and remotely managing multiple sessions from Lark Mobile App or Lark Web.
66
77
## Upstream project — `lark-channel-bridge`
88

@@ -20,17 +20,17 @@ This fork intentionally keeps the upstream project prominent in the documentatio
2020

2121
## What this fork adds
2222

23-
The upstream bridge already lets a Lark Chat / Group / Topic interact with a local coding agent. This fork adds a Windows-focused **Codex Session control plane** for Codex sessions that may have been started independently in Windows Terminal rather than created only through the current Lark scope.
23+
The upstream bridge already lets a Lark Chat / Group / Topic interact with a local coding agent. This fork adds a Windows-focused **Session control plane** for Codex and Claude Code sessions that may have been started independently in Windows Terminal rather than created only through the current Lark scope. Each bot manages the agent its profile runs, with the same `/session` commands for both — see [Claude Code sessions](#claude-code-sessions).
2424

2525
| Area | Upstream `lark-channel-bridge` | This fork adds |
2626
|---|---|---|
2727
| Lark/Feishu ↔ Claude Code / Codex bridge | Core upstream feature | Reused as the foundation |
2828
| Per-chat/topic session continuity | Core upstream feature | Preserved |
2929
| Workspace switching and saved workspaces | Core upstream feature | Preserved |
3030
| Streaming and interactive cards | Core upstream feature | Extended with session-control actions |
31-
| Windows Codex sessions started independently of Lark | Not the focus of the original Lark scope model | Automatic local discovery and monitoring |
32-
| Windows runtime view | — | `/windows status` |
33-
| Safe Windows writer release | — | `/windows release` with Release Agent |
31+
| Windows Codex / Claude Code sessions started independently of Lark | Not the focus of the original Lark scope model | Automatic local discovery and monitoring |
32+
| Windows runtime view (Codex) | — | `/windows status` |
33+
| Safe Windows writer release (Codex) | — | `/windows release` with Release Agent |
3434
| Cross-runtime session inventory | — | `/session list` |
3535
| Detached Session → current Lark scope | — | `/session use` |
3636
| Windows → Lark ownership transfer | — | `/session handoff` |
@@ -42,7 +42,7 @@ The upstream bridge already lets a Lark Chat / Group / Topic interact with a loc
4242

4343
### Why these extensions exist
4444

45-
A common workflow is to start several Codex CLI sessions directly on a Windows workstation and later leave the computer. The additional Observer, monitor, release, and ownership layers let Lark become a remote control surface for those existing sessions:
45+
A common workflow is to start several Codex CLI or Claude Code sessions directly on a Windows workstation and later leave the computer. The additional monitoring, release, and ownership layers let Lark become a remote control surface for those existing sessions. For Codex the path looks like this (Claude Code needs no Observer — it keeps its own process registry; see [Claude Code sessions](#claude-code-sessions)):
4646

4747
```text
4848
Windows Terminal / codex3
@@ -66,14 +66,14 @@ Windows Terminal / codex3
6666

6767
From Lark you can inspect Windows sessions, safely release a waiting Windows writer, hand a session to the current Lark scope, use a detached session, and hand the current Lark-owned session back to Windows without requiring Remote Desktop.
6868

69-
## Remote Codex session management from Lark
69+
## Remote session management from Lark
7070

7171
The UI follows the same three-layer model as the command set:
7272

7373
| Scope | Recommended commands | Meaning |
7474
|---|---|---|
7575
| Lark Scope | `/lark status`, `/lark new`, `/lark resume` | Current Lark Chat / Group / Topic binding |
76-
| Windows Runtime | `/windows status`, `/windows release` | Windows Codex TUI, Observer, Release Agent, writer |
76+
| Windows Runtime (Codex only) | `/windows status`, `/windows release` | Windows Codex TUI, Observer, Release Agent, writer |
7777
| Global Session Manager | `/session list`, `/session use`, `/session handoff`, `/session handback` | Cross-runtime inventory and ownership transfer |
7878

7979
The interactive cards are especially useful on a phone:
@@ -99,6 +99,23 @@ Project names and working directories are shown as metadata, but are **not** use
9999

100100
`/session list` opens on category tabs — **Handoff**, **Use**, **Hand Back**, **All** — drawn from the 10 most recent Sessions, defaulting to the first category that has a Session in it. Each tab lists exactly the Sessions that render that action's button. Use `/session list <keyword>` to find an older Session.
101101

102+
### Screenshots
103+
104+
<table>
105+
<tr>
106+
<td align="center"><strong>Lark scope</strong></td>
107+
<td align="center"><strong>Windows runtime</strong></td>
108+
<td align="center"><strong>All Codex sessions</strong></td>
109+
</tr>
110+
<tr>
111+
<td><img src="./screenshots/lark-session-status.png" alt="Lark Session Status" width="100%"></td>
112+
<td><img src="./screenshots/windows-codex-sessions.png" alt="Windows Codex Sessions" width="100%"></td>
113+
<td><img src="./screenshots/all-codex-sessions.png" alt="All Codex Sessions" width="100%"></td>
114+
</tr>
115+
</table>
116+
117+
This makes it possible to inspect and switch Codex ownership remotely from Lark Mobile or Lark Web while keeping the Windows/Lark single-writer rule explicit.
118+
102119
## Claude Code sessions
103120

104121
A profile runs exactly one agent (`agentKind` is `codex` or `claude`), so every `/session` command works on **that profile's agent**. The commands are identical on a Codex bot and a Claude bot — there is no agent parameter:
@@ -145,23 +162,6 @@ Codex does not need this step because `codex3` starts its Release Agent from the
145162

146163
Without the agent, elevated Claude windows are shown as **Running as administrator — Claude release agent not running** and offer no Handoff button. Claude windows started from a normal terminal can be handed off without it.
147164

148-
### Screenshots
149-
150-
<table>
151-
<tr>
152-
<td align="center"><strong>Lark scope</strong></td>
153-
<td align="center"><strong>Windows runtime</strong></td>
154-
<td align="center"><strong>All Codex sessions</strong></td>
155-
</tr>
156-
<tr>
157-
<td><img src="./screenshots/lark-session-status.png" alt="Lark Session Status" width="100%"></td>
158-
<td><img src="./screenshots/windows-codex-sessions.png" alt="Windows Codex Sessions" width="100%"></td>
159-
<td><img src="./screenshots/all-codex-sessions.png" alt="All Codex Sessions" width="100%"></td>
160-
</tr>
161-
</table>
162-
163-
This makes it possible to inspect and switch Codex ownership remotely from Lark Mobile or Lark Web while keeping the Windows/Lark single-writer rule explicit.
164-
165165
## Compatibility aliases
166166

167167
Legacy commands remain available as compatibility aliases:
@@ -221,10 +221,16 @@ Then resume it on Windows with the command returned by the bridge:
221221
codex3 resume <Session-ID>
222222
```
223223

224+
With Claude Code the flow is the same, in the Claude bot's group: start `claude` on Windows, then use `/session list` / `/session handoff` (there is no `/windows` step), and resume on Windows after a handback with:
225+
226+
```powershell
227+
claude --resume <Session-ID>
228+
```
229+
224230
## Ownership model
225231

226232
```text
227-
One Codex Session
233+
One Session (Codex or Claude Code)
228234
│
229235
├── Windows writer
230236
├── Lark scope
@@ -268,8 +274,14 @@ pnpm build
268274
npm install -g .
269275
.\scripts\windows\Install-CodexBridgeScripts.ps1
270276
277+
# Once, from an elevated PowerShell, if you start Claude as administrator:
278+
.\scripts\windows\Register-ClaudeReleaseAgent.ps1
279+
280+
# Restart each profile you run:
271281
lark-channel-bridge stop --profile codex
272282
lark-channel-bridge start --profile codex
283+
lark-channel-bridge stop --profile claude
284+
lark-channel-bridge start --profile claude
273285
```
274286

275287
Do not replace the local build with `npm install -g lark-channel-bridge@latest`; that installs the upstream registry package and removes the local session-management extensions.
@@ -279,7 +291,7 @@ Do not replace the local build with `npm install -g lark-channel-bridge@latest`;
279291
- [Local documentation index](./local-docs/README.md)
280292
- [Third-party Codex API provider setup](./local-docs/01-codex-third-party-api-key.md)
281293
- [Lark / Bridge / Codex architecture](./local-docs/02-lark-bridge-codex-architecture.md)
282-
- [Codex session management](./local-docs/03-codex-session-management.md)
294+
- [Codex / Claude Code session management](./local-docs/03-codex-session-management.md)
283295

284296
## Upstream and attribution
285297

‎README.zh-CN.md‎

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# lark-channel-bridge — Windows Codex Session 远程管理扩展
1+
# lark-channel-bridge — 面向 Codex 与 Claude Code 的 Windows Session 远程管理扩展
22

33
[English](./README.md) | **简体中文**
44

5-
> 本仓库是在上游 **`lark-channel-bridge`** 基础上维护的 Windows / Codex 增强版本,重点增加本地 Codex CLI Session 的发现与监控、Windows 与 Lark 之间的安全 ownership transfer,以及通过 Lark Mobile App / Lark Web 远程管理多个 Codex Session 的能力。
5+
> 本仓库是在上游 **`lark-channel-bridge`** 基础上维护的 Windows 增强版本,重点增加本地 **Codex CLI** 与 **Claude Code** Session 的发现与监控、Windows 与 Lark 之间的安全 ownership transfer,以及通过 Lark Mobile App / Lark Web 远程管理多个 Session 的能力。
66
77
## 上游项目 — `lark-channel-bridge`
88

@@ -20,17 +20,17 @@
2020

2121
## 本 fork 新增了什么
2222

23-
上游 bridge 已经能够让一个 Lark Chat / Group / Topic 与本地 Coding Agent 交互。本 fork 进一步增加了一个面向 Windows 的 **Codex Session 控制层**,用于管理那些直接在 Windows Terminal 中启动、并不一定由当前 Lark scope 创建的 Codex Session。
23+
上游 bridge 已经能够让一个 Lark Chat / Group / Topic 与本地 Coding Agent 交互。本 fork 进一步增加了一个面向 Windows 的 **Session 控制层**,用于管理那些直接在 Windows Terminal 中启动、并不一定由当前 Lark scope 创建的 Codex 与 Claude Code Session。每个 bot 管理其 profile 所运行的 agent,两者使用相同的 `/session` 命令,见 [Claude Code 会话](#claude-code-会话)。
2424

2525
| 能力 | 上游 `lark-channel-bridge` | 本 fork 新增 |
2626
|---|---|---|
2727
| Lark/飞书 ↔ Claude Code / Codex Bridge | 上游核心能力 | 直接复用 |
2828
| Chat / Topic 独立 Session | 上游核心能力 | 保留 |
2929
| Workspace 切换与保存 | 上游核心能力 | 保留 |
3030
| Streaming / Interactive Card | 上游核心能力 | 增加 Session 控制 Action |
31-
| 独立从 Windows 启动的 Codex Session | 不是原 Lark scope 模型的主要关注点 | 自动发现与监控 |
32-
| Windows Runtime 视图 | — | `/windows status` |
33-
| 安全释放 Windows writer | — | `/windows release` + Release Agent |
31+
| 独立从 Windows 启动的 Codex / Claude Code Session | 不是原 Lark scope 模型的主要关注点 | 自动发现与监控 |
32+
| Windows Runtime 视图(Codex) | — | `/windows status` |
33+
| 安全释放 Windows writer(Codex) | — | `/windows release` + Release Agent |
3434
| 跨运行时 Session inventory | — | `/session list` |
3535
| Detached Session → 当前 Lark scope | — | `/session use` |
3636
| Windows → Lark ownership transfer | — | `/session handoff` |
@@ -42,7 +42,7 @@
4242

4343
### 为什么增加这些能力
4444

45-
一个典型场景是在 Windows 工作站中直接启动多个 Codex CLI Session,然后离开电脑。新增的 Observer、Monitor、Release 和 Ownership 层可以把这些已经存在的 Session 暴露给 Lark:
45+
一个典型场景是在 Windows 工作站中直接启动多个 Codex CLI 或 Claude Code Session,然后离开电脑。新增的监控、Release 和 Ownership 层可以把这些已经存在的 Session 暴露给 Lark。Codex 的链路如下(Claude Code 自带进程登记,不需要 Observer,见 [Claude Code 会话](#claude-code-会话)):
4646

4747
```text
4848
Windows Terminal / codex3
@@ -66,14 +66,14 @@ Windows Terminal / codex3
6666

6767
这样无需连接 Remote Desktop,就可以从 Lark 查看 Windows Session、release Waiting 状态的 Windows writer、把 Session handoff 到当前 Lark scope、接管 Detached Session,并在之后 handback 给 Windows。
6868

69-
## 从 Lark 远程管理 Codex Session
69+
## 从 Lark 远程管理 Session
7070

7171
Session 命令和 UI 统一分为三层:
7272

7373
| 范围 | 推荐命令 | 含义 |
7474
|---|---|---|
7575
| Lark Scope | `/lark status`, `/lark new`, `/lark resume` | 当前 Lark Chat / Group / Topic 的 Session binding |
76-
| Windows Runtime | `/windows status`, `/windows release` | Windows Codex TUI、Observer、Release Agent、writer |
76+
| Windows Runtime(仅 Codex) | `/windows status`, `/windows release` | Windows Codex TUI、Observer、Release Agent、writer |
7777
| Global Session Manager | `/session list`, `/session use`, `/session handoff`, `/session handback` | 跨 Windows / Lark 的 Session inventory 与 ownership transfer |
7878

7979
Interactive Card 针对手机端操作做了进一步优化:
@@ -99,6 +99,23 @@ Thread Name
9999

100100
`/session list` 打开时显示分类标签 **Handoff / Use / Hand Back / All**,取最近 10 个 Session,默认打开第一个非空分类。每个分类下列出的,正好是会显示该操作按钮的 Session。更早的 Session 用 `/session list <关键字>` 查找。
101101

102+
### Screenshots
103+
104+
<table>
105+
<tr>
106+
<td align="center"><strong>Lark Scope</strong></td>
107+
<td align="center"><strong>Windows Runtime</strong></td>
108+
<td align="center"><strong>All Codex Sessions</strong></td>
109+
</tr>
110+
<tr>
111+
<td><img src="./screenshots/lark-session-status.png" alt="Lark Session Status" width="100%"></td>
112+
<td><img src="./screenshots/windows-codex-sessions.png" alt="Windows Codex Sessions" width="100%"></td>
113+
<td><img src="./screenshots/all-codex-sessions.png" alt="All Codex Sessions" width="100%"></td>
114+
</tr>
115+
</table>
116+
117+
这样可以直接在手机 Lark 或 Lark Web 中查看 Session、释放 Windows writer、把 Windows Session handoff 到当前 Lark、接管 Detached Session,或者再 handback 给 Windows,同时保持明确的单 Writer 语义。
118+
102119
## Claude Code 会话
103120

104121
一个 profile 只运行一种 agent(`agentKind` 为 `codex` 或 `claude`),所以所有 `/session` 命令都作用于**这个 profile 的 agent**。Codex bot 和 Claude bot 上的命令完全相同,不需要任何 agent 参数:
@@ -145,23 +162,6 @@ Codex 不需要这一步,是因为 `codex3` 在它所在的管理员终端里
145162

146163
没有代理时,管理员权限的 Claude 窗口会显示 **Running as administrator — Claude release agent not running**,不提供 Handoff 按钮。从普通终端启动的 Claude 窗口不需要代理也能接管。
147164

148-
### Screenshots
149-
150-
<table>
151-
<tr>
152-
<td align="center"><strong>Lark Scope</strong></td>
153-
<td align="center"><strong>Windows Runtime</strong></td>
154-
<td align="center"><strong>All Codex Sessions</strong></td>
155-
</tr>
156-
<tr>
157-
<td><img src="./screenshots/lark-session-status.png" alt="Lark Session Status" width="100%"></td>
158-
<td><img src="./screenshots/windows-codex-sessions.png" alt="Windows Codex Sessions" width="100%"></td>
159-
<td><img src="./screenshots/all-codex-sessions.png" alt="All Codex Sessions" width="100%"></td>
160-
</tr>
161-
</table>
162-
163-
这样可以直接在手机 Lark 或 Lark Web 中查看 Session、释放 Windows writer、把 Windows Session handoff 到当前 Lark、接管 Detached Session,或者再 handback 给 Windows,同时保持明确的单 Writer 语义。
164-
165165
## 兼容旧命令
166166

167167
旧命令目前继续作为 alias:
@@ -229,10 +229,16 @@ codex3 resume <Session-ID>
229229

230230
在 Windows 中执行即可继续同一个 Codex Session。
231231

232+
Claude Code 的流程相同,在 Claude bot 的群里进行:在 Windows 上启动 `claude`,然后用 `/session list` / `/session handoff`(没有 `/windows` 这一步)。handback 之后在 Windows 上这样续接:
233+
234+
```powershell
235+
claude --resume <Session-ID>
236+
```
237+
232238
## Ownership model
233239

234240
```text
235-
同一个 Codex Session
241+
同一个 Session(Codex 或 Claude Code)
236242
│
237243
├── Windows writer
238244
├── Lark scope
@@ -276,8 +282,14 @@ pnpm build
276282
npm install -g .
277283
.\scripts\windows\Install-CodexBridgeScripts.ps1
278284
285+
# 如果以管理员身份启动 Claude,在管理员 PowerShell 中执行一次:
286+
.\scripts\windows\Register-ClaudeReleaseAgent.ps1
287+
288+
# 重启正在使用的每个 profile:
279289
lark-channel-bridge stop --profile codex
280290
lark-channel-bridge start --profile codex
291+
lark-channel-bridge stop --profile claude
292+
lark-channel-bridge start --profile claude
281293
```
282294

283295
不要使用 `npm install -g lark-channel-bridge@latest` 覆盖本地增强版,否则本地 Session 管理功能会被上游 registry 包替换。
@@ -287,7 +299,7 @@ lark-channel-bridge start --profile codex
287299
- [本地文档索引](./local-docs/README.zh-CN.md)
288300
- [Codex 第三方 API Provider](./local-docs/01-codex-third-party-api-key.zh-CN.md)
289301
- [Lark / Bridge / Codex 架构](./local-docs/02-lark-bridge-codex-architecture.zh-CN.md)
290-
- [Codex Session 管理](./local-docs/03-codex-session-management.zh-CN.md)
302+
- [Codex / Claude Code Session 管理](./local-docs/03-codex-session-management.zh-CN.md)
291303

292304
## 上游与致谢
293305

‎local-docs/03-codex-session-management.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Codex Session / Thread Management and Local Storage Reference
1+
# Codex / Claude Code Session Management and Local Storage Reference
22

33
**English** | [简体中文](./03-codex-session-management.zh-CN.md)
44

@@ -8,6 +8,8 @@
88
>
99
> - **Project observations** from Windows + Codex CLI 0.155.x with an isolated `CODEX_HOME`.
1010
> - **Public Codex implementation/documentation** from OpenAI's Codex docs and the `openai/codex` repository. Internal storage formats can evolve and should not be treated as permanent public APIs.
11+
>
12+
> Most of the document is the Codex reference. The Claude Code side — its transcripts and process registry, the Claude Release Agent, and how both agents bind to a Lark scope — is covered under `/session list` in section 28.
1113
1214
---
1315

@@ -16,7 +18,7 @@
1618

1719
```text
1820
Lark Scope → /lark status | /lark new | /lark resume
19-
Windows Runtime → /windows status | /windows release
21+
Windows Runtime → /windows status | /windows release (Codex only)
2022
Global Sessions → /session list | /session use | /session handoff | /session handback
2123
```
2224

‎local-docs/03-codex-session-management.zh-CN.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Codex Session / Thread 管理机制与本地存储参考
1+
# Codex / Claude Code Session 管理机制与本地存储参考
22

33
[English](./03-codex-session-management.md) | **简体中文**
44

@@ -8,6 +8,8 @@
88
>
99
> - **本项目实测**:主要基于 Windows + Codex CLI 0.155.x、独立 `CODEX_HOME` 的 rollout/status 调试结果。
1010
> - **Codex 公开实现 / 文档**:基于 OpenAI Codex 官方文档和 `openai/codex` 开源代码。内部持久化格式会演进,因此不要把内部字段视为永久稳定 API。
11+
>
12+
> 本文主体是 Codex 参考。Claude Code 部分(transcript 与进程登记、Claude Release Agent,以及两种 agent 如何绑定到 Lark scope)在第 28 节 `/session list` 之下。
1113
1214
---
1315

@@ -16,7 +18,7 @@
1618

1719
```text
1820
Lark Scope → /lark status | /lark new | /lark resume
19-
Windows Runtime → /windows status | /windows release
21+
Windows Runtime → /windows status | /windows release (仅 Codex)
2022
Global Sessions → /session list | /session use | /session handoff | /session handback
2123
```
2224

0 commit comments

Comments
 (0)