Fork of every-code/main with a short list of changes: Android/Termux builds, Codex ports into code-rs, managed network mediation, a context-aware Memories pipeline, app-server exec v2 with Windows sandboxing, and TUI cleanup.
Differences · Matrix · Dev notes · Compare · Validate
This repo keeps changes in two buckets:
Codex port: pulled from upstreamcodex-rsintocode-rs.Fork choice: intentional behavior/architecture change (not just a straight port).
Legend: Hybrid = started as a Codex port, then got adapted for this fork.
| Area | Source | How it works here | Pointers |
|---|---|---|---|
| Tool runtime architecture | Codex port | Tool routing moved out of streaming into a router/registry/handler layout. | code-rs/core/src/tools/* |
| Parallel tool dispatch | Codex port | Parallel batches exist, but get downgraded when ordering metadata is missing. | code-rs/core/src/tools/scheduler.rs |
| Tool handler coverage checks | Codex port | Tests ensure enabled function/freeform tools have handlers. | code-rs/core/src/tools/router.rs |
| MCP dispatch policy | Fork choice | MCP dispatch=parallel is user-configurable and still access-gated. |
code-rs/core/src/mcp_connection_manager.rscode-rs/core/src/config_types.rs |
search_tool_bm25 |
Hybrid | MCP tools stay hidden until search selection exists, then only selected tools are exposed. | code-rs/core/src/tools/handlers/search_tool_bm25.rscode-rs/core/src/tools/router.rs |
apply_patch |
Hybrid | Dedicated handler, but it still runs the same local safety checks (branch/hook/diff). | code-rs/core/src/tools/handlers/apply_patch.rscode-rs/core/src/codex/exec_tool.rs |
Streamable shell (exec_command, write_stdin) |
Hybrid | PTY sessions with cleanup on abort/kill and apply-patch interception guidance. | code-rs/core/src/tools/handlers/exec_command.rscode-rs/core/src/exec_command/session_manager.rs |
| App-server exec v2 | Hybrid | Raw command/exec* sessions support streaming output, stdin writes, resize/terminate, and connection-scoped process ids. |
code-rs/app-server/src/command_exec.rscode-rs/app-server-protocol/src/protocol/v2.rs |
| Windows sandbox runtime | Hybrid | Windows secure exec supports restricted-token/elevated modes through a dedicated sandbox backend instead of silently falling back to unsandboxed execution. | code-rs/core/src/windows_sandbox.rscode-rs/core/src/sandboxing.rscode-rs/windows-sandbox-rs/* |
| JS REPL | Hybrid | Runtime-selectable (node/deno), configurable runtime path/args, per-call override; Node >=18 required. |
code-rs/core/src/tools/js_repl/*code-rs/core/src/tools/handlers/js_repl.rs |
| JS REPL history linkage | Fork choice | Child execs track parent_call_id, show lineage markers, and support jump-to-parent navigation. |
code-rs/tui/src/history_cell/js_repl.rscode-rs/tui/src/chatwidget/exec_tools/lifecycle/begin_flow.rs |
| MCP resource tools | Codex port | list_mcp_resources, list_mcp_resource_templates, read_mcp_resource are implemented. |
code-rs/core/src/tools/handlers/mcp_resource.rs |
| MCP settings editor | Fork choice | TUI supports server/tool scheduling edits (persist + apply without a full restart). | code-rs/tui/src/bottom_pane/mcp_settings_view/*code-rs/tui/src/app/events.rs |
| Network mediation | Hybrid | Upstream mediation ideas, but fork UX/policy: temporary approvals + macOS fail-closed path for sandboxed runs. Gated at build time via managed-network-proxy. |
code-rs/core/src/network_approval.rscode-rs/core/src/seatbelt.rscode-rs/tui/src/bottom_pane/settings_pages/network/* |
| Network approval UX | Fork choice | Network prompts have network-specific options (allow once, allow for session, deny run/open settings). |
code-rs/tui/src/user_approval_widget.rscode-rs/tui/src/chatwidget/history_pipeline/runtime_flow/approvals.rs |
| Status line lanes | Fork choice | Independent top/bottom status lanes with /statusline routing, clickable actions, speed toggles, and directory-picker controls. |
code-rs/tui/src/chatwidget/status_line_flow.rscode-rs/tui/src/chatwidget/terminal_surface_render.rs |
| Settings UX routing | Fork choice | Settings can render as an overlay or in the bottom pane; auto switches by width threshold. |
code-rs/tui/src/chatwidget/settings_routing.rs |
| Session context mode / auto-context | Hybrid | Session tuning lets you choose a context mode and see auto-context checks. On supported models, auto uses the 1M-capable limits while keeping pre-turn compaction checks active; enabled forces the large window without the extra "when should I compact?" layer, and disabled stays on model defaults. |
code-rs/core/src/protocol.rscode-rs/core/src/codex/streaming/submission/configure_session/*code-rs/tui/src/bottom_pane/model_selection_view.rs |
| Hotkeys | Fork choice | Global + per-platform overrides (macos/windows/linux/android/termux/BSD), Fn keys + modifier chords. |
code-rs/core/src/config_types.rscode-rs/tui/src/bottom_pane/interface_settings_view.rs |
| Output folding in history | Fork choice | Tool/exec/JS-heavy outputs can collapse to keep history readable. | code-rs/tui/src/history_cell/* |
| Shell profile system | Fork choice | Shell-style profiles include summaries, scoped skills/references, MCP include/exclude, and safety overrides. | code-rs/core/src/config_types.rscode-rs/core/src/config/sources.rs |
| Shell/profile UX | Fork choice | Shell selection + profile editing are exposed in settings views. | code-rs/tui/src/bottom_pane/shell_selection_view.rscode-rs/tui/src/chatwidget/shell_config_flow.rs |
| Memories pipeline | Hybrid | Memories are context-aware, epoch-based, backed by a derived SQLite index, and published through immutable snapshot generations for prompt selection and human inspection. | code-rs/core/src/memories/*code-rs/memories-state/src/lib.rs |
| Auth model | Fork choice | Multi-account workflows and separate CLI auth store mode vs MCP OAuth store mode. | code-rs/core/src/auth_accounts.rscode-rs/core/src/config.rs |
| Credentials storage controls | Fork choice | file, keyring, auto, and ephemeral modes are configurable and used by TUI account flows. |
code-rs/core/src/auth/storage.rscode-rs/tui/src/bottom_pane/login_accounts_view.rs |
| Picker/file-manager actions | Fork choice | Profile/config path workflows support a picker and "open in file manager", with fallbacks. | code-rs/tui/src/bottom_pane/* |
| CLI automation commands | Codex port | code fork, code sandbox, debug send-message-v2 helpers are present. |
code-rs/cli/src/* |
| Streaming recovery | Codex port | Retry/auto-compact reconciliation hardening with stronger tool-call correlation. | code-rs/core/src/codex/streaming/* |
| Stream ordering diagnostics | Fork choice | Ordering guarantees are backed by replay tooling for debugging regressions. | code-rs/cli/src/bin/order_replay.rs |
| Utility crates | Codex port | stream-parser, sleep-inhibitor, plus newer exec/runtime helpers like pty and string live in code-rs/utils. |
code-rs/utils/stream-parsercode-rs/utils/sleep-inhibitorcode-rs/utils/ptycode-rs/utils/string |
| Android/Termux gating | Fork choice | Unsupported browser/CDP paths are compile-time gated; build flow is fork-specific. | code-rs/tui/src/chatwidget.rsbuild.zsh |
More detail (ports, fork choices, safety rules)
- Tool runtime modularization: router/registry/handler replaces monolithic tool routing in streaming.
- Parallel tool scheduler parity: batch/exclusive planning with ordering safeguards.
- Tool surface parity:
search_tool_bm25,apply_patch,exec_command,write_stdin, optionaljs_repl. - MCP parity wiring: richer status/auth/runtime handling.
- MCP resource tools: list/read resource surfaces.
- App-server exec v2: raw
command/exec*sessions, output deltas, stdin writes, resize/terminate support. - Windows sandbox parity for raw exec: restricted-token/elevated runtime support instead of unsandboxed fallback.
- CLI parity commands:
code fork,code sandbox, and debug send-message-v2 helpers. - Streaming/recovery parity: retry/compaction reconciliation and tool-call correlation hardening.
- Utility backports:
stream-parser,sleep-inhibitor, plus newerpty/stringhelpers used by exec/runtime parity work.
- Shell selection and profiles are configurable and exposed in the TUI.
- MCP scheduling is enforced in core and editable in TUI.
- Network mediation is opt-in and shows up in settings, approvals, and the statusline (with deep links).
- Settings can render in two places (overlay + bottom pane); width decides which.
- The header/status area is interactive: you can change speed mode and working directory from the UI.
- Hotkeys are configurable with per-platform overrides.
- Multi-account auth storage is split: CLI auth vs MCP OAuth.
- Android/Termux builds compile out unsupported browser/CDP paths.
search_tool_bm25gates MCP visibility until a session selection exists.apply_patchhandler is wired through the local safety/hook/diff checks.exec_command/write_stdinuses the local exec lifecycle and safety checks.- Session context mode and auto-context checks are wired through configure-session and the TUI tuning flow. In practice,
autois basically "1M + early warnings" on supported models: it enables the larger window, keeps the check events flowing, and warns or compacts before later turns when context gets tight. - Memories use upstream-style extraction/selection ideas, but this fork keeps
SessionCatalogas the source of truth and publishes immutable snapshots. - Network mediation enforcement policy differs by platform (macOS stricter; others best-effort).
codex-rsis treated as read-only reference; runtime changes land incode-rs.- Stream ordering stays strict and testable (there's a replay tool for debugging).
- Config persistence stays layered (root/profile/session semantics are deliberate).
Note
This README is only about what's different from upstream Every Code. For install/usage docs and the general overview, start with upstream.
- Upstream remote:
upstream(just-every/code) - Upstream baseline branch:
every-code/main
- Rust sources to edit live under
code-rs/. codex-rs/is treated as a read-only mirror of OpenAI Codex and used for parity work and reference.
The managed network proxy subsystem (and its dependency tree) is controlled by a single Cargo feature:
- Default build: proxy enabled (status quo):
cargo build -p code-cli - Small build: proxy + Network UI compiled out:
cargo build -p code-cli --no-default-features - Explicit opt-in:
cargo build -p code-cli --features managed-network-proxy
When compiled without managed-network-proxy, [network] enabled=true is ignored and Codex emits a warning during session configuration.
git diff every-code/main..main
git log --oneline every-code/main..main./build-fast.sh