Skip to content

Run the code index as an optional service outside the core runtime #1145

Open

Description

@zlareb1

Company or project name

ClickHouse

Component

Code index

Use case

Agent platforms need Loom's memory and knowledge APIs without installing repository build tools or coupling their API availability to indexing jobs. Installations that use code intelligence need to scale and isolate repository checkout, parsing and compiler work independently.

A code-index service fits Loom as an optional capability behind the same authenticated product interface. The extractor and separate worker processes are useful existing boundaries, but they do not by themselves remove code tooling from the main runtime image.

Describe the solution you'd like

Make the code-index capability an optional, independently deployable service. The core remains the public API/MCP entry point and delegates code operations through a defined service contract. The code service owns repository ingestion/indexing and code-query execution; the core owns memory admission and its canonical memory state.

Deliver the largest resource separation first: repository jobs, compiler toolchains, parsing, index workers and their filesystem mounts. The end state must also define code-query and memory/code-enrichment boundaries, rather than leaving an undocumented dependency on code modules inside the core. A composed setup may launch core, code service and existing extractor together; it must use the same implementation and contract as separate deployment.

Acceptance criteria

  • The core starts and serves its non-code operations without the code service, compiler toolchains, SCIP executables, repository checkouts or code-index Python extras. Disabled code jobs cannot still launch through a CLI or another transport. Keep sandbox enforcement on every repository job that can run.
  • The code service has its own artifact, process lifecycle, resource limits, health, durable job state and worker coordination. Define which responsibilities stay in the existing extractor so document extraction is not accidentally coupled to this split.
  • Preserve the public code-operation contract through the core gateway. SDKs, CLI and MCP clients do not need a second public base URL or service credential. Internal requests preserve verified caller identity, organization/namespace scope, repository access and source provenance; caller-supplied identity fields cannot grant access.
  • Indexing requests, progress, cancellation, reindexing, failures and query results are available through HTTP API, CLI, every supported SDK, UI and appropriate MCP/agent tools. Use one backend contract with the same permissions, pagination, errors and idempotency semantics. Document intentional restrictions and a non-UI alternative for each management action.
  • Advertise whether code indexing is configured and available. Disabled or unavailable code capabilities return an explicit state, not empty search results or a claimed successful index. Core memory readiness does not require an unconfigured optional code service; an operator can explicitly require the capability for an installation that depends on it.
  • Preserve memory-to-code links, source commit/hash identity, provenance, repository permissions and erasure coverage across the boundary. A code-service outage cannot mark a link verified/current or turn an unavailable index into evidence that code was deleted. Replay and duplicate events must not create duplicate link changes or rewrite a user's memory outside normal memory admission.
  • Do not add another mandatory database or a second canonical memory store. Shared state belongs in the deployment's supported stores; repository workspaces and caches are disposable and isolated per job.
  • Ship install/upgrade instructions, service contract/version behavior, deployment manifests and a capability matrix. Replace the old execution path in the same change; do not keep two competing code engines behind fallback flags.
  • Validate core-only, core-plus-code and composed deployments through the supported clients. Report reproducible image size, dependency inventory, startup time and idle memory before/after with the same configuration. Do not claim a reduction before measuring it; this issue does not authorize a paid model benchmark.

Describe alternatives you've considered

Separating generic web and worker processes reduces request contention but can leave the same toolchains and dependencies in every image. The extractor already isolates some parsing work. Splitting only an HTTP route leaves repository resources and startup imports coupled. Requiring all installations to run a code service would defeat the core-only use case.

Where the need comes from

The need is mine, an AI tool helped shape the proposal

Additional context

User-requested architecture proposal, based on source inspection at 985c92cf988cfa9668cdcaa6aa5bcb219647563f. No deployment, indexing job, resource benchmark or code change was performed.

Related product workflows must remain available without the dashboard: #1141, #1142, #1143, #1144.

Activity

  1. added
    enhancement
    on Nov 22, 2026
  2. self-assigned this
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions