greglab
AI LabInternal

Discord Codex Bridge

The workflow connecting project conversations to focused engineering work.

A local operations bridge that turns approved Discord requests into bounded engineering runs in the correct project checkout, then carries a concise result back to the originating channel.

Access
Internal
Runtime
Python + cron
Secrets
AWS Parameter Store
First commit
2026-05-02

What it is

Discord Codex Bridge connects a declared set of Discord channels to matching workspaces under the shared project directory. Each mapping keeps conversation and code context aligned without asking the requester to operate a shell.

The scheduled runner polls on a peak and off-peak cadence, accepts work only from allowed authors, downloads supported attachments, and preserves a per-channel cursor so old messages are not replayed.

A Claude orchestration step plans and reviews each task while Codex performs the repository work. Runs are serialized with a PID-aware lock, bounded to three execution rounds, and recorded in credential-redacted local artifacts.

Outage classification keeps environmental failures queued without consuming task attempts. Credentials load from AWS Systems Manager Parameter Store and never belong in the repository or response logs.

Highlights

  • Channel-to-repository routing
  • Bounded retries and outage recovery
  • Credential-redacted operational logs

Capabilities

Key features

Project-aware routing

A checked-in channel map selects the right local checkout for each request, including this showcase, the games, study tools, and operational projects.

Cursor-based polling

Each channel records its last processed Discord snowflake so scheduled runs handle new work once and leave earlier history alone.

Attachment handoff

Images and bounded text-like files are downloaded for task context, passed to the worker when relevant, and removed after handling.

Reviewed execution loop

The orchestrator plans, delegates, reviews validation, and can request another bounded Codex pass before posting the final summary.

Outage recovery

Authentication and service failures preserve queued messages, rate-limit reminders, and announce recovery after processing resumes.

Under the hood

How it works

  1. 1Cron invokes the runner every minute; a DST-aware cadence gate decides whether that tick should poll.
  2. 2Allowed messages are grouped by their declared channel-to-project mapping and enriched with safe attachment context.
  3. 3The orchestrator runs the implementation and review loop in that mapped workspace, then the bridge posts a concise reply.
  4. 4Per-channel cursors advance only after a terminal task result; environmental outages leave work queued.

Recent changes

Full changelog →
  1. Added the greglab website channel

    Mapped the new showcase project channel to this repository.

  2. Improved outage handling

    Preserved queued work and tightened failure classification and reminders.

  3. Added AIF-C01 routing

    Connected study-site requests to the AIF-C01 repository.