Skip to content

Explore Obelisk as a bounded historical-evidence provider for Replan #3792

Description

@huangruiteng

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:

  1. repeated or materially unchanged Replan attempts;
  2. exhausted hypotheses with missing historical coverage;
  3. handoff or resume where earlier session evidence is unavailable; or
  4. 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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions