Start here
The Codex CLI path is Bread’s current live-validated release gate. The latest release bootstrap downloads a platform archive and verifies its SHA-256 digest:
curl -fsSL https://raw.githubusercontent.com/Yabuku-xD/bread/main/scripts/install-bread | sh
For a reproducible install, use an immutable release tag for both the installer script and release asset:
curl -fsSL https://raw.githubusercontent.com/Yabuku-xD/bread/<release-tag>/scripts/install-bread | sh -s <release-tag>
Codex
Add Bread's marketplace and install its plugin:
codex plugin marketplace add Yabuku-xD/bread
codex plugin add bread@bread
Start a new Codex session in the repository where you want Bread enabled, then
open /hooks and review/trust Bread's exact command hook. The
plugin invokes the bread binary installed above; it never
downloads or executes a binary itself.
For a project-local hook instead of the plugin path, run
bread install codex in the target repository. Do not use both
hook surfaces: they would run the same Bread policy twice.
| Need the full install and rollback path? Read the Codex release guide → | Need codebase-indexing details? Read the indexing contract → | Evaluating Grok Build? Read the Grok integration guide → |
Where Bread fits
Codex CLI
│
│ documented SessionStart, PreToolUse, PostToolUse, UserPromptSubmit events
▼
Bread hook and per-workspace daemon
│
├── bounded search and read output
├── stale-edit and restricted-path checks
├── provenance, relevance gates, and session deduplication
└── local lexical, structural, and optional semantic retrieval
▼
Native agent tools and the workspace
Unsupported events, untrusted or disabled hooks, malformed input, daemon failures, and timeouts fail open to native agent behavior. Bread is a bounded policy and context layer, not a universal interceptor.
What Bread changes
| Workflow | Without Bread | With Bread |
|---|---|---|
| Search a repository | Broad command output can overwhelm context | Ripgrep-compatible in-process search, ignore-aware discovery, structured capped matches |
| Read a large file | The agent may receive the full file | A range or structural outline includes a freshness marker |
| Edit after a file changes | An old patch can target drifted content | Bread denies the stale write and requests one narrow reread |
| Explore an unfamiliar codebase | Repeat searches and reconnect symbols manually | Bounded lexical, structural, and tested one-hop local-import context |
| Handle a vague prompt | Guess at useful repository text to add | Stay silent below the relevance gate |
Bread uses ripgrep-compatible search crates in-process for search parity. It
does not promise to outperform standalone rg at raw search
throughput; its value is the bounded, safe agent workflow around that engine.
Evidence, not marketing arithmetic
All numbers below are local fixtures or matched sandbox measurements. They
share a repository snapshot, policy, Codex CLI 0.144.3,
gpt-5.6-terra, and low reasoning effort where stated. Sample
sizes are intentionally visible because small samples and agent tool-choice
variance do not establish universal outcomes.
The deterministic scorecard is deliberately narrower than the sandbox rows:
it runs 128 synthetic PreToolUse pass-through decisions for a
Bash ls event and reports Rust Instant
percentiles; its replay reduction compresses a fixed 240-line output fixture
and estimates tokens as characters divided by four. The rows labeled local
sandbox n=… are separate matched observations, not scorecard
medians. The five warmed release-run median described in the indexing contract
applies only to its 2,000-declaration indexing fixture.
| Measurement | Bread | Baseline or threshold | Evidence |
|---|---|---|---|
Broad Cargo.lock model-visible output | 4,172 chars | 73,408 chars | 94.3% lower, local sandbox, n=1 |
Broad Cargo.lock input tokens | 43,779 | 70,436 | 37.8% lower, local sandbox, n=1 |
| Codex output tokens | 320 | 1,107 | 71.1% lower, matched pairs, n=2 |
Broad Cargo.lock wall time | 7.86 s | 9.74 s | 19.3% lower, local sandbox, n=1 |
| README inspection wall time | 9.78 s | 7.36 s | 32.9% higher, local sandbox, n=1 |
| Replayed context reduction | 49.6% | 40% target | Deterministic scorecard |
| Stale-edit prevention | 100% | 80% target | Deterministic replay |
| Freshness ghost results | 0 | 0 required | Deterministic scorecard |
| Literal search matches | Exact fixture set | Ripgrep reference set | Deterministic parity check |
The slower README inspection is important: Bread may add hook and decision overhead to a small direct read. It earns that cost only when it removes enough downstream context, repeated work, or unsafe state to repay it.
Run the default evidence scorecard yourself:
cargo run --quiet -- scorecard
Capabilities
Bounded search, reads, and edits
- Search: ripgrep-compatible search crates, ignore-aware discovery, and structured output limits.
- Reads: ranged reads and Tree-sitter outlines preserve useful source context while attaching freshness information.
- Edits: deny rules run before disk access; stale patches are stopped before they can overwrite changed content.
- Prompt context: eligible technical prompts can receive provenance-tagged, budgeted, session-deduplicated context. Vague or instruction-like prompts remain silent.
Workspace-local codebase indexing
Bread makes a deliberately narrow, inspectable index instead of claiming to replicate a proprietary indexer.
| Index tier | Scope | Result |
|---|---|---|
| Native structural | Rust, Python, JavaScript, TypeScript/TSX | Tree-sitter declarations, syntax status, and tested local imports |
| Bounded structural | Recognized languages with a conservative declaration form | At most 256 conservative declaration-aware chunks |
| Lexical | Unknown or declaration-free text | Exact and lexical chunks without guessed structure |
| Excluded | Denied, ignored, .bread/, and .git paths | Never indexed |
The static registry recognizes 115 language identifiers by filename, compound suffix, extension, modeline, shebang, or selected content signature. Known filenames and extensions use direct static dispatch: no runtime catalog, glob construction, registry scan, or heap allocation on that path.
Only tested repository-local imports expand a result. The index does not guess package, URL, absolute-path, standard-library, or bare-import edges. Complete generations are published atomically, so readers get the previous complete index or its replacement—not a half-updated graph.
Read the complete indexing contract →
Optional semantic retrieval
Exact symbols and lexical candidates are always available. With an explicit semantic build and opt-in, local vector candidates are fused with lexical results. A missing model, corrupt checkpoint, or semantic failure leaves the lexical tier available.
The default build does not download a semantic model or add a runtime language catalog. Build the opt-in tier only when validating it:
cargo build --features semantic --locked
./target/debug/bread index --semantic --query "authentication flow"
Hook scope and safety
For Codex, Bread registers:
SessionStartfor startup, resume, clear, and compact;PreToolUseandPostToolUseforBashandapply_patch; andUserPromptSubmitfor prompt-context eligibility.
These boundaries are deliberate:
- Ignore and deny rules run before indexing or context assembly.
- Restricted paths never enter index records or prompt context.
- When an installed, trusted, and healthy Bread hook evaluates a request, restricted paths are denied before disk access. Disabled or untrusted hooks, malformed input, daemon failures, and timeouts fall open to native behavior; Bread policy does not execute in those cases.
- Hooks do not run compilers, language servers, external classifiers, or network downloads.
- Missing daemons, parser errors, and unavailable optional assets fall back to the strongest safe lower tier.
- The current Codex matrix has 200 local adapter cases: restricted-path denials, safe pass-throughs, concise and oversized outputs, eligible injections, and vague-prompt no-injection checks.
Commands
| Command | Use it to |
|---|---|
bread install codex | Add Bread-owned Codex hook entries to the current project |
bread uninstall codex | Restore the private backup or remove only Bread-owned entries |
bread status | Inspect daemon state plus index generation, coverage, record counts, and semantic-checkpoint presence |
bread scorecard | Run the deterministic default-feature evidence scorecard |
bread inventory | Print a bounded, metadata-only JSON overview of the workspace: file categories, byte totals, an estimated text-token cost, and a top-level directory breakdown |
bread index --semantic --query "..." | Build and query the optional local semantic index |
bread run -- command | Run a command and compact its standard output |
bread inventory is manual and metadata-only. It classifies files by
name and extension and reads non-following metadata; it never opens contents,
follows symlinks, builds the index, calls a model, or uses the network. Ignore
rules, hidden-file policy, .git/ and .bread/
exclusion, and denied paths apply before counting, and only bounded aggregates
are reported — never individual paths. Reach for it to orient in an unfamiliar
workspace, then use search and ranged reads for specific code. It does not
enable automatic media or document extraction. On Codex, one static
session-start cue advertises it without injecting any workspace data.
Integration status
| Surface | Current position |
|---|---|
| Codex CLI | Live-validated release target in the shared isolated sandbox |
| Claude Code | Project adapter implemented; live CLI validation deferred |
| Grok Build | Project and user-hook adapters implemented; live CLI validation deferred |
Bread does not install, upgrade, remove, or modify globally installed agent CLIs. Live integration testing stays inside an isolated sandbox with the cheapest capable model.
Release checklist
cargo fmt --all -- --check
cargo test --all-features
cargo clippy --all-targets --all-features -- -D warnings
cargo run --quiet -- scorecard
scripts/codex-release-smoke
The semantic smoke is opt-in:
BREAD_SEMANTIC_SMOKE=on scripts/codex-release-smoke