---
title: h5i Radio – 利用 Git，让 Claude 和 Codex 进行实时对话
date: 2026-06-04T14:27:17Z
modified: 2026-06-04T14:27:28Z
permalink: "https://www.appinn.com/h5i-radio/"
type: post
status: publish
excerpt: ""
categories:
  - AI
tags:
  - AI
  - Claude
  - Codex
  - Git
featured_image: "https://www.appinn.com/wp-content/uploads/2026/06/Copy-of-appinn-homework-44.jpg"
author: 青小蛙
timestamp: 2026-06-04T14:27:28Z
---

例如，我们现在可以问 Claude：“你能否与 Codex 通过 h5i 一起想出一个更好的下一代深度学习框架设计？”，也可以问 Codex：“你能否与 Claude 通过 h5i 一起想出一个更好的下一代深度学习框架设计？”

![](https://www.appinn.com/wp-content/uploads/2026/06/Copy-of-appinn-homework-44.jpg)

h5i 是一个开源工具，它把 AI Agent 的任务、消息、记忆和协作信息存储到 Git 中，让多个 Agent 能像开发者协作代码一样共享上下文、协同工作。

**h5i Radio** 则是其中一个很有意思的功能。它利用 Git 仓库作为中介，让 Claude Code、Codex 等 AI Agent 能够互相发送消息、讨论问题，甚至共同完成任务。

## 安装


curl -fsSL https://raw.githubusercontent.com/Koukyosyumei/h5i/main/install.sh | sh


只需要打开两个独立的终端，分别启动 Claude Code 和 Codex，然后对 Claude 说上面的那些话就行了。后续的消息交换会通过 Git 仓库自动同步。

## **Agent Radio** 原理

**Agent Radio** 把 Git 仓库当成一个聊天群，每条消息其实就是一行 JSON，存放在 Git 仓库里的一个特殊位置（`refs/h5i/msg`）中。

![](https://www.appinn.com/wp-content/uploads/2026/06/ezgif.com-gif-to-mp4-converter.mp4-00.00.000.avif)

### 发送消息时：

1. Agent 把消息写进去；
2. 执行 `git push`；
3. 其他 Agent 执行 `git pull`；
4. 收到消息并继续回复

### 回复时也很简单：

- 写入一条新消息；
- 使用 `reply_to` 指向被回复的消息；
- 再次推送到仓库。

整个过程不需要消息服务器、数据库或 WebSocket，Git 本身就承担了消息同步的工作。

### 另外几个功能

- `h5i msg watch`：从另一个终端监控他们的对话
- `h5i share pr post`：将这段对话的简要总结发布到 GitHub Pull Request 中

## 获取

- [GitHub](https://github.com/h5i-dev/h5i)

---

原文：https://www.appinn.com/h5i-radio/

## Topics

**分类目录:** [AI](https://www.appinn.com/category/ai/?output_format=md)

**标签:** [Claude](https://www.appinn.com/tag/claude/?output_format=md), [Codex](https://www.appinn.com/tag/codex/?output_format=md), [Git](https://www.appinn.com/tag/git/?output_format=md)