Skip to content

Releases: pilotspace/laya-codex

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 04:02
86b2d4d

A faster, more accurate re-ranker.

laya-code-r2 is the new default re-ranker.

  • It is a ModernBERT-base model with laya's decision head, trained by this project on laya-codex's own candidate lists. It replaces laya-code-r1.
  • It is served at 128 tokens × 12 candidates, for prompts and for search.
  • More right files: offline, it inlines 141 of 238 gold files, against r1's 132 and keywords' 118.
  • Faster prompt hook: about 130 ms (p50, M4 Pro) instead of 517 ms, with four exact Metal speed-ups of the forward pass. Their output is bit-identical.
  • Smaller download: about 330 MB instead of 850 MB.

Metal on macOS before 15. candle 0.11 panicked when it opened a Metal device on macOS 14 and earlier. Every release since v0.1.0 therefore ranked by keywords only on those Macs. Fixed.

Benchmark v15: 60 held-out tasks, Claude Sonnet 5.5.

per session stock v0.4.0 v0.5.0
Cost $0.066 $0.062 $0.062 (−6.6% vs stock)
Wall-clock 21.8 s 18.1 s 18.5 s (−15.2%)
Lookup calls 3.87 2.03 1.83
Lookup time 10.6 s 6.4 s 5.4 s
Right files, first question 0.73 0.81 0.84
  • Against v0.4.0: lookup time −16.7%. Cost and recall moved the right way but not significantly, and nothing got worse.
  • Against stock: code read plus injected is +32%.
  • Caveat: the run's score cache was off because of a full disk, which adds hook time only. See docs/RESULTS.md.

Upgrade

  • An r1 install keeps working.
  • Get r2 with curl -fsSL https://raw.githubusercontent.com/pilotspace/laya-codex/main/install.sh | sh -s -- --model-only.
  • laya-codex doctor shows which model is serving.

Full list: CHANGELOG.

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 28 Sep 03:08
43f531a

laya-codex 0.4.0

Claude answers its own lookups with laya-codex search instead of Grep. The reranker is retrained on the candidates laya-codex actually ranks. Follow-up prompts get answers instead of more code. No breaking changes.

Benchmark v10: stock Claude Code against this release's code with the retrained model, 51 paired tasks across 3 repositories.

metric change
turns −34%
tool calls per session 9.0 → 5.3 (Grep 5.3 → 2.0; search about 1)
wall-clock −12% [−19, −4]
cost −9%
first-question recall 0.76 → 0.90
code read + injected +6%, not significant

The −30% time and −50% token goals are not met yet. Benchmark v11 tested a smaller injection, and Claude read 23% more to make up for it, so it is not in this release. See docs/RESULTS.md.

Highlights

  • search answers name lookups (definitions, callers, uses, tests) with a complete scan of the files the indexer admits, and Laya orders the files.
  • Retrained laya-code: on the offline replay, the right file is inlined for 70 of 115 tasks, against 63 for the first model and 62 for keyword ranking. The installer pins it to Hugging Face revision 25f97e5 and verifies its manifest. The first model stays on the repo's main branch.
  • Follow-ups that ask for tests or callers get lists of them instead of more code blocks. This cuts the second prompt's injection by about 60%.
  • Removed: the scope classifier, probability-threshold sizing, repository-size caps and Read narrowing.

Full list: CHANGELOG.

Upgrade:

  • Re-run the installer: curl -fsSL https://raw.githubusercontent.com/pilotspace/laya-codex/main/install.sh | sh.
    • On macOS it replaces only the model files that changed, mainly the 843 MB weights.
    • On Linux the model stays opt-in (--model).
  • With Homebrew, run brew upgrade laya-codex, then fetch the model with curl -fsSL https://raw.githubusercontent.com/pilotspace/laya-codex/main/install.sh | sh -s -- --model-only.

What's Changed

Full Changelog: v0.3.0...v0.4.0

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 24 Sep 06:25
2845a70

Better-aimed, steadier ranking, and a debug trace

  • Ranking uses your task, not the instructions around it. Prompts that wrap a task in instructions ("find the source code… end with FILES: …") no longer pull docs and changelogs to the top. On the 60 benchmark tasks, the right file reached the code Claude gets up front in 48 tasks instead of 42.
  • The Laya model keeps ranking when the machine is busy. It now scores the most promising candidates first and stops inside its 1.2 s budget, instead of all or nothing. On a busy GPU it ranked 59 of 60 prompts instead of 0–2, and answered about 0.35 s sooner.
  • Fewer re-checks by Claude.
    • Inlined code is checked against the file on disk and labelled as the exact current content.
    • A definition's use list says when it's complete.
    • At most two files are inlined (one for single-function tasks).
  • laya-codex trace (off by default) records what Claude Code and laya-codex exchange, including which ranking each prompt got. Use trace on, trace show --full, trace off.
  • A nearly full disk no longer disables laya-codex silently. When Moon pauses writes, ranking keeps working from the existing index. laya-codex doctor reports the problem with a fix, and daemon.log records failed requests.
  • doctor no longer reports hooks as broken when their command starts with environment variables.

No breaking changes. Benchmark v2 results across three repositories, and why its model-vs-keywords comparison is inconclusive, are in docs/RESULTS.md. Full details: CHANGELOG.

Upgrade: curl -fsSL https://raw.githubusercontent.com/pilotspace/laya-codex/main/install.sh | sh, then laya-codex stop so the next prompt starts the new daemon.

What's Changed

Full Changelog: v0.2.0...v0.3.0

laya-codex v0.2.0

Choose a tag to compare

@github-actions github-actions released this 23 Sep 12:35
d55441e

One name: laya-codex

Everything you use is now called laya-codex. "Laya" by itself now refers only to the upstream Laya model that laya-codex uses to re-rank code.

before (0.1.x) now
laya command laya-codex
LAYA_* environment variables LAYA_CODEX_*
MCP server laya, tool laya_search server laya-codex, tool search

This is a clean break: the old names no longer work.

Upgrading from 0.1.x

  1. Reinstall, then remove the old binary:
    curl -fsSL https://raw.githubusercontent.com/pilotspace/laya-codex/main/install.sh | sh, then rm ~/.local/bin/laya.
  2. Plugin users, inside Claude Code: /plugin marketplace update laya-codex, then /plugin update laya-codex@laya-codex, then restart Claude Code.
  3. Repositories set up with laya init: run laya-codex init --repo <repo>, then delete the old laya hook entries from .claude/settings.local.json and the old "laya" server from .mcp.json.
  4. Environment variables: rename any LAYA_* you set to LAYA_CODEX_*.

See the CHANGELOG for the full guide.

New ways to get started

  • Homebrew: brew install pilotspace/tap/laya-codex, then install.sh --model-only to fetch the model.
  • A new README with charts. In the benchmark, a correct file was already in Claude's context before its first turn in 15 of 20 tasks; stock Claude Code got there at turn 6.5 (median).
  • Example use cases and How it works, both built from real output.

Fixes

  • laya-codex now finds its bundled moon even when it's run through a symlink, as Homebrew installs it.
  • init now writes the plain laya-codex hook command instead of a version-specific path that breaks when you upgrade.
  • doctor now tells you to fetch a missing model with install.sh --model-only.

The benchmark numbers, the model and the injection format are unchanged from v0.1.x.

Known limitations

  • Moon password: the local search server's password is visible in the process list until Moon enforces its ACL file.
  • Linux: laya-codex ranks by keywords alone by default, because the model runs on the CPU there and is too slow.

laya-codex v0.1.2

Choose a tag to compare

@github-actions github-actions released this 23 Sep 09:27
a38c8be

New: install laya as a Claude Code plugin

First install the binary:

curl -fsSL https://raw.githubusercontent.com/pilotspace/laya-codex/main/install.sh | sh

Then, inside Claude Code:

/plugin marketplace add pilotspace/laya-codex
/plugin install laya-codex@laya-codex

The plugin turns on laya's hooks and the laya_search MCP tool in every repository you open, so you no longer need laya init in each one.

  • Auto-indexing: git repositories are indexed automatically when a session starts. Other folders, such as your home directory, never are.
  • Missing binary: if laya isn't installed, the plugin stays idle and shows a one-line install hint.
  • Existing setups: in repositories you already set up with laya init, the plugin steps aside so hooks don't run twice.
  • Teams: choose project scope when installing to share the plugin through .claude/settings.json.

Hardening

  • Crash isolation: a crash on an unusual file no longer takes down the daemon. Crashes are contained per request, per index job and per file, and the hooks still fail open.
  • Pipes: laya query … | head now exits quietly instead of printing "Aborted".
  • Bad paths: laya index, laya query --repo and laya init --repo now reject a path that doesn't exist or isn't a directory.
  • Daemon limits: at most 64 connections, request lines of up to 1 MiB, socket timeouts, and clamped query sizes.

The benchmark numbers, the model and the injection format are unchanged. Full changes: CHANGELOG.md. What comes next: ROADMAP.md.

Known limitations

  • Moon password: the password laya generates for Moon is visible in the process list until Moon enforces its ACL file.
  • Linux ranking: the re-ranker runs on CPU, so the installer skips it on Linux by default and ranking is lexical only.

laya-codex v0.1.1

Choose a tag to compare

@github-actions github-actions released this 23 Sep 08:46
39dcd20

These fixes came out of installing v0.1.0 from the public release. If you're on Linux, upgrade: the v0.1.0 Linux Moon never answered a request.

Install or upgrade (macOS Apple Silicon, Linux x86_64)

curl -fsSL https://raw.githubusercontent.com/pilotspace/laya-codex/main/install.sh | sh
laya init --repo /path/to/repo
laya doctor --repo /path/to/repo

Fixed

  • Linux: Moon is now built with its default monoio runtime. The Tokio build in v0.1.0 never accepted a connection on Linux. monoio also works where io_uring is blocked, for example in containers.
  • Installer: a stalled download is now abandoned after 30 s and retried from a clean file. Before, it waited out a 10-minute limit, and the retry corrupted the download.
  • Moon startup: a newly started Moon now gets 30 s to answer instead of 3 s. LAYA_MOON_START_SECS changes the limit.

Added

  • The release pipeline now runs the built laya and moon together on macOS and Linux before publishing: it indexes a repo, queries it and runs doctor.

The benchmark numbers, the model and all other behaviour are unchanged from v0.1.0. Full changes: CHANGELOG.md. What comes next: ROADMAP.md.

Known limitations

  • Moon password: the password laya generates for Moon shows in the process list until Moon enforces its ACL file.
  • Linux ranking: the re-ranker runs on CPU, so the installer skips it by default and ranking is lexical only.

laya-codex v0.1.0

Choose a tag to compare

@github-actions github-actions released this 23 Sep 07:36
d4b0f7c

Known issue (Linux): the Linux Moon asset in this release never answers requests. It is built with Moon's Tokio runtime, which on Linux stops accepting connections centrally and relies on per-shard listeners that fail to bind. laya then reports that Moon did not answer. macOS is unaffected. Fixed in v0.1.1 — re-run the installer.

First public release of laya-codex, ranked code retrieval for Claude Code. It puts the code a task needs in front of Claude before Claude goes looking for it.

Install (macOS Apple Silicon, Linux x86_64)

curl -fsSL https://raw.githubusercontent.com/pilotspace/laya-codex/main/install.sh | sh
laya init --repo /path/to/repo
laya doctor --repo /path/to/repo

This installs laya and its Moon sidecar in ~/.local/bin. On macOS it also downloads the laya-code re-ranker. Every download is checked against a SHA-256.

Measured effect

Default settings against stock Claude Code, on 20 held-out tasks with two prompts per session. Figures are paired, with 95% confidence intervals.

  • Code-reading tokens: −50.1% [−61.6, −33.0]
  • Wall-clock: −17.4% [−31.5, −1.0]
  • Turns: −23.4%
  • Cost: −27.2%
  • Answer recall: 0.933 vs 0.975, a difference that is not significant.

We are reporting these honestly: the −30% time goal is not met yet. See docs/RESULTS.md for the full numbers and ROADMAP.md for what's next.

Assets

Asset Contents License
laya-v0.1.0-<target>.tar.gz the laya binary, plus a list of third-party licenses Apache-2.0
moon-v0.1.0-<target>.tar.gz Moon, built unmodified from commit 8bba3ced Moon's own LICENSE, included in the archive

Known limitations

  • Moon password: the password laya generates for Moon is visible in the process list. It stays that way until Moon enforces its ACL file.
  • Linux: the re-ranker runs on CPU. The installer skips the model by default there, so ranking is lexical only.

Full list of changes: CHANGELOG.md.