Skip to content

Repository files navigation

CodexPigeon hero

CodexPigeon

Non-interrupting mailbox companion for Codex worktrees.

Built by Adem Isler · MIT licensed · macOS and Linux development builds

CILicense: MITPlatform: macOS and Linux


What This Is

CodexPigeon lets a human leave repo-local guidance for a Codex task without injecting into the active chat turn.

It gives each selected repo/worktree a .codex-mailbox/ folder. The app and CLI append human messages to INBOX.md; the Codex agent reads those messages at safe checkpoints through installed project instructions and hooks, then writes status back to agent-owned files.

The product invariant is strict:

  • no active chat steering
  • no chat message injection
  • no turn interruption or turn start APIs
  • no App Server write APIs
  • no app writes to agent-owned OUTBOX.md or RECEIPTS.md

Open Source

This repository is intended to be inspectable. The mailbox protocol is plain Markdown, runtime files are repo-local, and all Codex App Server access is restricted to read/status/discovery methods.

The current release is a working MVP for local macOS and Linux development. Signed packages can be added later without changing the protocol.

Screenshot

CodexPigeon demo screenshot

The README screenshot is captured from demo mode with synthetic workspace paths and synthetic mailbox content. It does not show private Codex state.

What You Get

AreaIncluded
Desktop appElectron + React + Vite app with mailbox, receipts, outbox, install, and diagnostics views
CLIcodexpigeon doctor, install, send, watch, snapshot, and automation commands
Mailbox coreParser, serializer, installer, validation, file ownership, and repeat scheduling
Codex integrationRead-only App Server client for thread and hook discovery
HooksProject-local hook runtime copied into trusted workspaces
TemplatesManaged AGENTS.md, .codex/hooks.json, and .codex-mailbox/ templates
TestsMailbox behavior, installer boundaries, hook runtime, and App Server allowlist coverage

The Result

Without CodexPigeonWith CodexPigeon
You must interrupt an active chat to add contextYou leave a mailbox note for the next safe checkpoint
Guidance can get mixed into conversational flowGuidance is stored as repo-local working state
Follow-up reminders are manualOptional repeats append normal inbox messages while the app/CLI is running
App Server boundaries are easy to blurMutating App Server methods are rejected by design

Quick Start: macOS

Requirements:

  • Node.js 22+
  • pnpm 11+
  • Python 3 for installed project hooks
  • Codex CLI/App Server for live thread discovery
pnpm install
pnpm typecheck
pnpm test
pnpm build
pnpm install:mac

This creates:

~/.local/bin/codexpigeon
~/.local/bin/codexpigeon-desktop
/Applications/CodexPigeon.app # preferred when /Applications is writable
~/Applications/CodexPigeon.app # fallback when /Applications is not writable

Then run:

codexpigeon doctor
codexpigeon-desktop

Quick Start: Development

Run the browser development shell:

pnpm dev

Open:

http://127.0.0.1:5173/

Browser mode uses a Vite-local Node API and cannot open a native folder picker. Type an absolute repo/worktree path in the right inspector.

Run the full Electron runtime:

pnpm --filter @codexpigeon/desktop dev:electron

Run sanitized demo mode for screenshots:

http://127.0.0.1:5173/?demo=1

CLI

During development:

pnpm --filter @codexpigeon/cli start -- doctor
pnpm --filter @codexpigeon/cli start -- install --workspace /path/to/worktree
pnpm --filter @codexpigeon/cli start -- send --workspace /path/to/worktree "Check the mailbox before final response."
pnpm --filter @codexpigeon/cli start -- send --workspace /path/to/worktree --repeat-every 5m "Please re-check the release gate."
pnpm --filter @codexpigeon/cli start -- watch --workspace /path/to/worktree
pnpm --filter @codexpigeon/cli start -- snapshot --workspace /path/to/worktree
pnpm --filter @codexpigeon/cli start -- automation list --workspace /path/to/worktree
pnpm --filter @codexpigeon/cli start -- automation stop --workspace /path/to/worktree auto_...

After pnpm build, the compiled CLI is exposed from packages/cli/dist/index.js and from the local macOS wrapper installed by pnpm install:mac.

Workspace Install Behavior

Installing CodexPigeon into a repo/worktree creates or updates:

AGENTS.md
.codex/hooks.json
.codex/hooks/codexpigeon_mailbox_hook.py
.codex-mailbox/README.md
.codex-mailbox/.gitignore
.codex-mailbox/INBOX.md
.codex-mailbox/STATE.json

Existing AGENTS.md content is preserved. CodexPigeon replaces only the managed block between:

<!-- CODEXPIGEON_MAILBOX_START --><!-- CODEXPIGEON_MAILBOX_END -->

Existing .codex/hooks.json files are parsed and merged. Non-CodexPigeon hook groups are preserved.

Agent-owned files are not written by the app/CLI:

.codex-mailbox/OUTBOX.md
.codex-mailbox/RECEIPTS.md

The installed hook creates those agent-owned files when Codex runs in the trusted workspace, and snapshots treat missing agent-owned files as empty.

Mailbox Rule

Each thread/worktree should have its own mailbox:

1 thread = 1 worktree = 1 .codex-mailbox/

Ownership is strict:

FileOwner
INBOX.mdApp/CLI writes only
OUTBOX.mdCodex agent writes only
RECEIPTS.mdCodex agent writes only
STATE.jsonApp-owned technical state
HOOK_STATE.jsonHook-owned throttle/runtime state

See Mailbox Protocol for message examples and status derivation.

Safety Boundary

CodexPigeon permits only these App Server methods:

  • initialize
  • thread/list
  • thread/read
  • thread/loaded/list
  • hooks/list

The client rejects active-turn methods such as turn/steer, turn/start, thread/inject_items, and turn/interrupt.

Mailbox content is treated as prompt-like human guidance, not executable shell content.

Documentation

DocumentPurpose
ArchitecturePackage boundaries and data flow
SetupLocal setup and development runtime
Mailbox ProtocolMarkdown file format and ownership rules
Security ModelTrust boundaries and review checklist
Development GuidePackage workflow and checks
TroubleshootingCommon local issues
Screenshots and AssetsSanitized asset capture rules
Publishing ChecklistGitHub release preparation
Release ChecklistBuild, smoke test, and handoff steps
Platform RoadmapPackaging and platform plans
Design ReferencesUI reference policy

Project Status

CodexPigeon is usable today for local macOS and Linux development. The next packaging milestones are signed macOS builds, Linux desktop packages, and a Windows packaging path after the mailbox protocol has more real-world mileage.

About

Non-interrupting mailbox companion for Codex worktrees on macOS and Linux, with repo-local inbox files, read-only App Server discovery, and safe checkpoint reminders.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages