Skip to content

feat(cli): /info one-page snapshot of session state#211

Merged
emal-avala merged 1 commit intomainfrom
feat/info-command
Apr 23, 2026
Merged

feat(cli): /info one-page snapshot of session state#211
emal-avala merged 1 commit intomainfrom
feat/info-command

Conversation

@emal-avala
Copy link
Copy Markdown
Member

@emal-avala emal-avala commented Apr 23, 2026

Summary

Adds `/info` — a single-screen view of the stuff that's currently spread across `/cost`, `/status`, `/sandbox`, `/model`, and `/mcp`.

```
Session
id : 9f2d1a34-...
cwd : /home/user/project
Model
current : your-preferred-model
fast : your-fast-model (configured; toggle with /fast)
Usage
turns : 12
tokens : 48512 total (in: 12000, out: 8500, cache_read: 27000, cache_write: 1012)
cost : $0.1834
messages : 25
Modes
brief, style=concise, sandbox=on
Environment
os : linux
arch : x86_64
shell : /bin/bash
mcp : 3 server(s) configured
hooks : 1 configured
```

Why

When you want a quick "where am I" check mid-session, running four separate commands is friction. `/info` is read-only, fast, and adds nothing to the conversation history.

Test plan

  • `cargo fmt --all`
  • `cargo clippy -p agent-code --all-targets -- -D warnings`
  • `cargo test -p agent-code --bin agent` (109 passed)
  • New tests (all on the pure `info_modes_line` helper):
    • `info_modes_line_shows_sandbox_on_by_default`
    • `info_modes_line_shows_sandbox_off`
    • `info_modes_line_lists_plan_and_brief`
    • `info_modes_line_shows_non_default_style`
    • `info_modes_line_omits_default_style`
    • `info_modes_line_marks_fast_mode`
    • `info_modes_line_orders_flags_then_sandbox`

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Comment thread crates/cli/src/commands/mod.rs Fixed
@emal-avala emal-avala force-pushed the feat/info-command branch 2 times, most recently from a9794cb to bb16417 Compare April 23, 2026 16:28
Rolls the things currently scattered across /cost, /status, /sandbox,
and /model into a single view:

  Session   id / cwd / additional dirs
  Model     current model + /fast paused-main / fast_model / base_url
  Usage     turns, tokens (in/out/cache split), cost, message count
  Modes     plan, brief, style, fast, sandbox — all in one line
  Environment  os, arch, shell, mcp server count, hook count

Independent helper `info_modes_line` is unit-tested for flag ordering
and default-style omission so future changes don't silently drop
flags.
@emal-avala emal-avala merged commit e0bbffc into main Apr 23, 2026
14 checks passed
@emal-avala emal-avala deleted the feat/info-command branch April 23, 2026 17:22
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