Skip to content

Add compact runtime status CLI#22

Merged
danieldear merged 2 commits into
mainfrom
codex/cli-runtime-status
May 17, 2026
Merged

Add compact runtime status CLI#22
danieldear merged 2 commits into
mainfrom
codex/cli-runtime-status

Conversation

@danieldear
Copy link
Copy Markdown
Owner

@danieldear danieldear commented May 16, 2026

Summary

  • add agent007 status for compact local runtime/session visibility
  • show active/running/blocked/failed counts plus recent session rows with lifecycle, workflow progress, age, and action hints
  • add --json output for tooling/automation

Validation

  • cargo fmt --all -- --check
  • cargo test -p agent007 runtime_status
  • cargo test -p agent007 parse_status_subcommand
  • cargo check -p agent007
  • cargo run -p agent007 -- status --limit 3
  • cargo run -p agent007 -- status --limit 1 --json

Copilot AI review requested due to automatic review settings May 16, 2026 20:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a top-level agent007 status command to provide compact local runtime/session visibility, including optional JSON output for tooling.

Changes:

  • Registers the new status CLI subcommand and dispatch path.
  • Adds runtime status snapshot building, JSON output, and compact table rendering.
  • Adds parser and formatting helper tests for the new command.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
crates/cli/src/main.rs Adds the Status command variant, dispatch handling, and CLI parse test.
crates/cli/src/commands/runtime_status.rs Implements status snapshot generation, workflow/session summarization, JSON output, and table formatting.
crates/cli/src/commands/mod.rs Exposes the new runtime_status command module.
Comments suppressed due to low confidence (2)

crates/cli/src/commands/runtime_status.rs:187

  • This only emits workflow-specific hints when a step is already running (or blocked/failed). Hosted workflows can also be waiting with no running step but with one or more ready/pending steps whose dependencies are satisfied; the existing runtime API handles that as ready/host should submit ready steps. Those sessions will fall through to monitor run, which is misleading because nothing is actually running and the host needs to submit the next step.
        if !workflow.running_steps.is_empty() {
            return "monitor running steps";
        }

crates/cli/src/commands/runtime_status.rs:249

  • Errors are truncated but not normalized like task and output_preview, so a multi-line workflow error can spill out of the compact row format and make the status table hard to parse. Replace embedded newlines before truncating here as well.
            println!("  error: {}", truncate(error, 88));

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/cli/src/commands/runtime_status.rs Outdated
Comment thread crates/cli/src/commands/runtime_status.rs
Comment thread crates/cli/src/commands/runtime_status.rs
@danieldear danieldear merged commit e704788 into main May 17, 2026
2 checks passed
@danieldear danieldear deleted the codex/cli-runtime-status branch May 17, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants