Skip to content

RLM: expose prompts and history as symbolic session objects #2032

@Hmbown

Description

@Hmbown

Why

RLM is strongest when large context stays outside the model's token stream and is manipulated through durable symbolic handles. Today the RLM REPL can hold an input handle and return bounded projections via helpers such as peek, search, chunk, sub_query_batch, and handle_read. The next step is to make CodeWhale's own prompt/session state addressable the same way.

Shape

Add first-class symbolic objects for the active session:

  • current system prompt and mode overlays
  • latest user prompt and composer history
  • transcript slices by turn/cell/tool-call id
  • saved session metadata and titles
  • tool traces and large tool outputs through existing handle storage

These should be readable by RLM through bounded, structured APIs instead of by copying whole transcripts into prompts. The model should be able to ask for projections, filters, and exact references, while the REPL keeps large objects resident.

Acceptance criteria

  • RLM sessions can inspect prompt/history/session objects through stable symbolic identifiers.
  • The parent transcript receives compact handles/summaries, not raw prompt or transcript dumps.
  • Sensitive surfaces respect existing trust/redaction boundaries.
  • Tests cover at least one active-session prompt object, one transcript slice, and one large-tool-output handle.
  • Docs explain the pattern without encouraging agents to paste their own prompt or whole history into context.

Notes

This should build on crates/tui/src/rlm/*, crates/tui/src/repl/runtime.rs, and crates/tui/src/tools/handle.rs; avoid creating a parallel context storage path unless the existing handle store cannot support the access pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions