The market thesis

OpenAI's healthcare opportunity will not be won only through enterprise contracts with large hospital systems. Independent practices and boutique clinics make up an important part of the market, but many lack the IT staff, implementation budgets, and tolerance for the heavyweight deployments built for corporate hospitals.

Flekks Codex is an attempt at a smaller, practical wedge: a lightweight, local-first medical workspace that brings Codex into an independent clinic without asking that clinic to replace its entire EMR on day one. It sits alongside existing systems, helps staff assemble focused context and review agent-assisted work, and keeps people in control of every consequential step. The longer-term opportunity is to let OpenAI and Codex earn adoption from the bottom of the market upward—not just from the largest institutions downward.

What it does

Flekks Codex adds a full-screen medical workspace launched with /workspacemedical. It combines a patient directory, notes and document references, a focused work area, and an agent workpane backed by durable local state.

Users explicitly choose the material sent into a versioned context packet. Agent output stays bound to that packet and returns as reviewable work; it cannot automatically sign, submit, overwrite records, contact a payer, or mutate source material.

Why start with a workflow layer

This prototype does not claim to be a complete EMR. A credible EMR replacement would also require scheduling, prescribing, billing, interoperability, compliance operations, and production integrations. The near-term product is the AI-native workspace: small enough for an independent clinic to try, useful before a costly migration, and architected so additional regulated workflows can be added behind explicit policy and approval gates.

Build Week contribution

The broader regulated-workflow harness predates Build Week. The eligible extension developed during the event is the July 16 medical-workspace editing and responsive-layout slice:

  • a reusable terminal text editor extracted from the large workspace module
  • Unicode grapheme-safe editing and deletion
  • wrapped visual cursor movement and wide-character column handling
  • multiline paste and CRLF normalization
  • stable caret and scroll positions across saves
  • responsive workspace behavior with snapshot coverage at five terminal sizes

This extension turns the existing workspace shell into a substantially more reliable hands-on editing experience while improving the architecture for future slices.

How it was built

The project is a Rust fork built on the OpenAI Codex harness, using Ratatui for the terminal UI and SQLite for local durable state. GPT-5.6 in Codex was used to plan and implement the eligible extension. Typed workflow state, explicit policy boundaries, content hashing, packet provenance, review checkpoints, and audit events keep agent work supervised and traceable.

Safety and boundaries

This is workflow infrastructure, not a diagnostic or autonomous billing system. Original local files are not automatically uploaded, parsed, OCRed, transcribed, or analyzed. Human review is required before any downstream use, and audit records avoid storing PHI.

Validation

Targeted Rust checks cover the medical-workspace launch path, context-packet and agent-result persistence, unsaved-draft preservation, file references, packet-scoped results, job drafts, and the extracted text editor. Formatting and diff-integrity checks pass locally.

Built With

Share this project:

Updates