Add CLI flags for self-improvement flow observability - #587
Merged
Conversation
Adds three non-interactive commands so the self-improvement cycle can be observed and tested from outside a running session: - `elroy list-tools [--contrib-tools-path PATH] [--no-base-tools]` — prints a JSON array of all registered tool names - `elroy list-plugins [--contrib-tools-path PATH]` — prints a JSON array of plugin name/tab_label objects from the contrib dir - `elroy list-codex-sessions [--database-url URL] [--user-token TOKEN] [--status STATUS]` — queries the DB and prints recorded Codex session metadata Adds an end-to-end test suite (tests/test_self_improvement_cli.py) covering each flag individually and a combined flow test that walks through the full cycle: empty contrib → Codex writes tool+plugin → flags confirm new artifacts are visible → session recorded as completed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
elroy list-tools [--contrib-tools-path PATH] [--no-base-tools]— prints a sorted JSON array of registered tool names, optionally filtered to contrib onlyelroy list-plugins [--contrib-tools-path PATH]— prints a JSON array of{name, tab_label}objects for plugins discovered in the contrib directoryelroy list-codex-sessions [--database-url URL] [--user-token TOKEN] [--status STATUS]— queries the SQLite DB and prints recorded Codex session metadata, with optional status filtering (e.g.--status running)Motivation
These flags make the self-improvement cycle observable from a shell or test without launching the full TUI. The pattern is: start a Codex edit session → poll
list-codex-sessions --status runningto wait for completion → confirmlist-toolsandlist-pluginsreflect the new artifacts.Test plan
just test tests/test_self_improvement_cli.py— 14 tests covering each flag individually plus a combined E2E flow testelroy list-tools— returns base tool names as JSONelroy list-tools --no-base-tools --contrib-tools-path /path/to/contrib— returns only contrib toolselroy list-plugins --contrib-tools-path /path/to/contrib— returns plugin infoelroy list-codex-sessions --status running— returns only in-progress sessions🤖 Generated with Claude Code