Repository navigation
Explore Obelisk as a bounded historical-evidence provider for Replan #3792
Description
Problem
When LoopX replans after repeated failures, exhausted hypotheses, or a handoff,
the current control-plane packet can say why replanning is required but may
not contain enough historical evidence to answer:
- did this agent already try the same route in an earlier session;
- which files, commands, hypotheses, or decisions actually failed;
- whether the proposed successor is materially new; and
- whether a blocker is new or merely rediscovered.
Obelisk indexes local Codex, Claude Code,
Kimi, Pi, and DSH session history into SQLite/FTS5 and exposes structured JS and
read-only SQL queries. It is a plausible source for this missing evidence, but
it must not become Replan authority or a raw-transcript injection path.
Evidence and product judgment
Obelisk's own public evaluations define a useful but narrow boundary:
- #39 reports strong
conversational and temporal retrieval, and a reduction in repeated dead-end
commands from 6.7% to 0.5%, but no statistically significant SWE retry uplift
from raw trajectory retrieval. Retrieved context was also large (25–51k
characters per query). - #46 reports no measurable
benefit from foreign-agent cross-task archives, while same-agent,
same-repository longitudinal history showed promising efficiency and quality
signals.
This supports a cold-path historical-evidence provider, not retrieval on
every Turn and not an automatic memory writer.
Proposed pilot
Add a default-off optional provider, tentatively
obelisk-session-evidence, under the existing agent-turn-recall capability.
Call it only for typed situations such as:
- repeated or materially unchanged Replan attempts;
- exhausted hypotheses with missing historical coverage;
- handoff or resume where earlier session evidence is unavailable; or
- an explicit operator request for prior-session evidence.
The first slice should be read-only and limited by default to the same agent,
same project/repository, recent or revision-relevant sessions. It should return
a bounded evidence packet plus a content-free receipt containing provider and
index revision, scope, provenance, opaque session/message ids, evidence type,
freshness/truncation, omitted count, and query/result digests.
Retrieval never satisfies Replan by itself. Existing typed outcomes still have
to establish a new surface, hypothesis, probe, grounded successor, blocker, or
coverage-backed exhaustion. Every result and receipt must declare
grants_new_action_authority=false and external_writes_performed=false.
Placement and licensing
- Capability owner: existing
agent-turn-recall; no new generic Obelisk
capability. - Provider id:
obelisk-session-evidence. - Delivery: optional extension/package, disabled by default.
- Boundary: invoke an independently installed, unmodified Obelisk CLI through
a bounded structured adapter. Do not vendor or link AGPL-3.0-only Obelisk
code into Apache-2.0 LoopX core. - Prefer an upstream structured JSON query envelope over arbitrary generated
JavaScript. A fixed escaped query template is the maximum acceptable MVP.
Pilot acceptance criteria
- Lower repeated-dead-end rate on matched, same-repository Replan cases.
- Lower tokens/provider calls or time-to-grounded-successor without reducing
task success or evidence quality. - Bounded context size, deterministic scope enforcement, explicit truncation,
and fail-closed rejection of unsupported query options. - No raw transcripts, local paths, identities, credentials, or query text in
public LoopX projections. - Index freshness and revision are observable; stale or incomplete indexes are
explicit, not silently treated as complete history. - Cross-agent retrieval and memory writes remain out of scope unless separately
enabled and qualified.
No-go criteria
Do not promote the provider if matched evaluation shows no measurable reduction
in repeated work or efficiency, if retrieval harms success/evidence quality, if
results cannot be bounded reliably, or if scope/query failures can broaden the
search silently.
Known upstream risks to qualify
- CI coverage: obelisk#34
- unsupported options may fail open: obelisk#94
- indexing/finalization cost: obelisk#75, obelisk#105
- tokenizer false positives: obelisk#76
- stale same-mtime Codex updates: obelisk#104
The accompanying RFC should define the typed request/result/receipt contract,
activation and disable lifecycle, staged evaluation, privacy boundary, and
relationship to Replan, Explore, Reward Memory, and OpenViking.
Activity
huangruiteng commentedon Aug 31, 2026
The bilingual RFC is now open in #3793. It narrows the first product slice to a default-off, read-only, same-agent/same-repository historical-evidence provider for typed Replan cold paths; retrieval remains non-authoritative, cross-agent history and automatic memory writes are excluded, and promotion is gated on matched repetition/efficiency evidence.
huangruiteng commentedon Sep 27, 2026
RFC task reconciliation: reuse this issue in the RFC task map. Current
mainalready contains the optional loopx-obelisk package and contract; the next contribution should inspect that implementation before proposing a new adapter.The remaining qualification must stay inside the RFC: bounded scoped historical evidence, typed failure/empty results, private/public separation, actual provider readback, default-off behavior and no settlement or memory authority. Package presence is not provider readiness, a qualified Replan consumer or permission to import host sessions. Coordinate continuation integration through #4085/#4339; retain any unqualified gates explicitly.