Skip to main content

open-codex-bridge

Python facade for running Codex app-server sessions and sharing their live conversation state over the Codex IPC owner/follower protocol.

Library usage

from pathlib import Path

from codex_bridge import CodexIpcConfig, CodexIpcSession


async def main() -> None:
    config = CodexIpcConfig(
        codex_bin=Path("/opt/homebrew/bin/codex"),
        host_id="local",
        model="gpt-5.4",
        reasoning_effort="high",
    )

    async with CodexIpcSession(config) as session:
        thread = await session.start_new_thread()
        print(f"started {thread.id}")

        async for state in session.watch_state():
            # Forward this raw conversation state to a browser over WebSocket.
            print(state)


async def resume_existing(thread_id: str) -> None:
    async with CodexIpcSession(CodexIpcConfig(thread_id=thread_id)) as session:
        await session.hydrate_initial_state()
        await session.run_prompt("Summarize the current repo", wait_for_completion=True)

If codex_bin is omitted, the Codex SDK uses its pinned runtime resolver. Pass an openai_codex.CodexConfig as codex_config when you need full control over app-server launch arguments.

SSH app-server

SSH websocket transport is an open-codex-bridge extension, not part of the official openai-codex SDK:

from codex_bridge import (
    AppServerConfig,
    CodexIpcConfig,
    SshConnectionConfig,
    SshWebsocketAppServerConfig,
)

config = CodexIpcConfig(
    codex_config=AppServerConfig(
        ssh_websocket=SshWebsocketAppServerConfig(
            connection=SshConnectionConfig(host="builder.example.com"),
            remote_cwd="/srv/project",
        )
    )
)

The older app_server_config argument remains available as a compatibility alias for existing consumers.

TUI demo

The TUI is a development tool and is kept out of the core dependency set:

uv run --extra tui python examples/demo.py --codex-bin /opt/homebrew/bin/codex

Core imports such as import codex_bridge do not require textual, rich, or pillow.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

open_codex_bridge-0.1.10.tar.gz (178.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

open_codex_bridge-0.1.10-py3-none-any.whl (60.5 kB view details)

Uploaded Python 3

File details

Details for the file open_codex_bridge-0.1.10.tar.gz.

File metadata

  • Download URL: open_codex_bridge-0.1.10.tar.gz
  • Upload date:
  • Size: 178.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for open_codex_bridge-0.1.10.tar.gz
Algorithm Hash digest
SHA256 dd4af9dd64fd1ce269e9a90ca166823e026a212798515082111c5695f136e877
MD5 e5ab4da142433a6d8423fedbe1da11fa
BLAKE2b-256 3fa008952767a5690ade0d567cc0c27100bb96961a182b11885769e2511fd046

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_codex_bridge-0.1.10.tar.gz:

Publisher: publish.yml on Sube-py/open-codex-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file open_codex_bridge-0.1.10-py3-none-any.whl.

File metadata

File hashes

Hashes for open_codex_bridge-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 ea9ffbc65f14841cfd58f92414063844916678ef9292d1ca8e07e2a2669635ce
MD5 aef27ad99f65a3c1ad002186b0d3cdfa
BLAKE2b-256 4e33db0622a2bdd5da8870c0406eb4b8d3bd258e32646e0dfca231eb48401193

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_codex_bridge-0.1.10-py3-none-any.whl:

Publisher: publish.yml on Sube-py/open-codex-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

This release

0.1.10 This release

2 files

0.1.9

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page