Skip to main content

Add your description here

Project description

codex-ipc

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_ipc 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 vendored app-server SDK uses its normal runtime resolver. Pass a codex_app_server.AppServerConfig as app_server_config when you need full control over app-server launch arguments.

TUI demo

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

uv run --extra tui codex-ipc-demo --codex-bin /opt/homebrew/bin/codex

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

Project details


Download files

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

Source Distribution

codex_ipc-0.1.2.tar.gz (137.8 kB view details)

Uploaded Source

Built Distribution

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

codex_ipc-0.1.2-py3-none-any.whl (110.5 kB view details)

Uploaded Python 3

File details

Details for the file codex_ipc-0.1.2.tar.gz.

File metadata

  • Download URL: codex_ipc-0.1.2.tar.gz
  • Upload date:
  • Size: 137.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for codex_ipc-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6bfbc530b82ac244c8d33be5c770ed7641d80f9e9a8d701c262d28b26dcee0d0
MD5 acd041f7a5374cdeb00d222b191e13d5
BLAKE2b-256 c22fb585b8991ca9cfdf8af92176f2b93b627bf7b27c5b3dec66e59a09c4fd4c

See more details on using hashes here.

File details

Details for the file codex_ipc-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: codex_ipc-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 110.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for codex_ipc-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 74aee644bb5e6404db8d0e1d196382a4e3e39df87a7fa77923f59df2b5b6ca3a
MD5 1e14e1888b79a614c675cc2d65c612d5
BLAKE2b-256 8cab182ef1c379a72f3e702bb0968e0e312b81468af19381ab4e431c3025f83c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page