Skip to content

feat: agent loop ledger (JSONL events with run IDs) on history and logs #2577

Open

Description

@codeforester

Goal

Persist loop events in a local, redacted, queryable ledger that reuses Base's run-ID and logging machinery.

Background

base_history and base_logs already provide run IDs, redaction, and reporting for command executions. Loop events should appear in the same evidence trail rather than a parallel one, so that handoff and metrics can be derived without new infrastructure.

Next-release planning review of 2026-10-14/15 against main at 7faf6dfb. Tracking: #2555.

Prerequisites: #2576.

Scope

Acceptance Criteria

  • Events validate against the schema.
  • Redaction tests cover tokens and environment values.
  • Ledger paths follow the cache ownership document.

Validation

BASE_CLI_SOURCE_DIR=../base-cli/lib/python \
PYTHONPATH=../base-cli/lib/python:lib/python:cli/python \
python -m pytest cli/python/base_history/tests cli/python/base_logs/tests <new ledger tests>
git diff --check

Non-Goals

  • No remote upload.
  • No new telemetry service.

Project Fields

  • Status: Backlog
  • Priority: P2
  • Area: CLI
  • Initiative: Agentic Coding Platform
  • Size: M
  • Milestone: v1.12.0
  • Category: enhancement

Agent Assignment

Assignee: codeforester. Blocked on #2576.

Plan revision (2026-10-16)

This remains a v1.12.0 ledger foundation. The JSONL writer must define append atomicity, partial-line recovery, corruption handling, run/event identity, and redaction boundaries clearly enough for #2582 replay. #2602 is the follow-on v1.13.0 issue for checkpoints, idempotency keys, GitHub readback, resume/abandon state, and interruption recovery; do not imply those guarantees are delivered by this issue alone.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or product improvement

Type

No type

Projects

  • Status
    Backlog

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions