Skip to content

Provide a way to view the content of the background terminal #13858

Closed

Description

@p81sunshine

What variant of Codex are you using?

CLI

What feature would you like to see?

There doesn't seem to be a way to view the full output of a background terminal. How can I inspect its complete content?

Additional information

No response

Activity

  1. added
    CLIIssues related to the Codex CLI
    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal display
    on Mar 7, 2026
  2. changed the title [-]How can I view the full content of the background terminal?[/-] [+]Provide a way to view the content of the background terminal[/+] on Mar 7, 2026
  3. ignatremizov commented on Mar 13, 2026

    @ignatremizov

    +1

    /ps
    
    Background terminals
    
      • ./.venv/bin/python - <<'PY' [...]
      • ./.venv/bin/python - <<'PY' [...]
      • ./.venv/bin/python - <<'PY' [...]
    
      3 background terminals running · /ps to view · /clean to close
    

    Is not helpful to understand what is happening

  4. ignatremizov commented on Mar 13, 2026

    @ignatremizov

    Implementation spec based on current main:

    This looks fixable as a TUI-only change. The CLI already receives background-terminal output chunks; the main limitation today is that the TUI throws almost all of that away and /ps renders a heavily truncated history cell.

    Current truncation points on main:

    • tui/src/chatwidget.rs
      • UnifiedExecProcessSummary only keeps recent_chunks: Vec<String>
      • track_unified_exec_output_chunk(...) keeps only the last 3 non-empty lines (MAX_RECENT_CHUNKS = 3)
    • tui/src/history_cell.rs
      • /ps only shows the first line of command_display
      • command preview is capped to 80 graphemes before width-based truncation
      • chunk previews are also width-truncated and suffixed with [...]

    Suggested implementation:

    1. Keep the footer summary as-is.

      • background terminal running · /ps to view · /clean to close is fine for the bottom pane.
    2. Change /ps from “insert truncated history cell into transcript” to “open a pager overlay”.

      • Reuse the existing static pager overlay in tui/src/pager_overlay.rs
      • This avoids flooding transcript history and gives proper scrolling for long prompts/output
    3. In tui/src/chatwidget.rs, replace recent_chunks: Vec<String> with a bounded per-process output buffer.

      • A VecDeque<String> line ring buffer is probably enough for an MVP
      • Bound it by total lines and/or bytes per process so memory stays predictable
      • Example target: keep the last 500-2000 lines or ~128-512 KiB per running process
      • No need for a config knob initially
    4. Keep both:

      • a short single-line summary for the footer
      • the full wrapped command text for the /ps overlay
    5. /ps overlay content should render, for each running process:

      • process id if available
      • full command/prompt text, wrapped, not first-line-only
      • buffered output below it, wrapped, not hard-truncated to 3 lines
    6. Nice follow-up, but not required for MVP:

      • when the overlay is open, keep it live by rebuilding from the in-memory process buffers on each draw/tick
      • optionally add per-process sections or jump keys later

    Why this seems low-risk:

    • No protocol change looks necessary for the CLI/TUI path
    • output chunks already reach ChatWidget; they are just summarized too aggressively today
    • the pager overlay already exists and is a better UI primitive than a transcript cell for this job

    So the practical MVP is:

    • store more than 3 recent lines
    • stop using a transcript cell for /ps
    • open a scrollable overlay showing full wrapped command text and buffered output for each running background terminal
  5. ChristopherP1221 commented on Apr 10, 2026

    @ChristopherP1221

    I've very recently switched from windsurf to codex and I'm missing this capability already. There is something strangely satisfying watching the actions stream by, whether you're in the loop or not. It's also a great way to catch and steer codex in a different direction if you're in a live troubleshooting session.

  6. nathan-chappell commented on Apr 16, 2026

    @nathan-chappell

    It's not a perfect solution, but a useful workaround for some may be to have logs be routed to a file (for instance, I just told codex to add a rotating file handler for my python app that I'm working on so tests give me an additional artifact for observation)

  7. Hexman768 commented on Apr 20, 2026

    @Hexman768

    +1, I would love to see the behavior also, it would be especially helpful in scenarios where the background terminal gets stuck or has a strange error when running commands.

  8. p81sunshine commented on Apr 23, 2026

    @p81sunshine
    Author

    It seems to be resolved by using ctrl+t in the newest version of codex

  9. onyedikachi23 commented on May 27, 2026

    @onyedikachi23

    It seems to be resolved by using ctrl+t in the newest version of codex

    This works but doesn't show the terminal output always. The panel opened from that command isn't smooth at all. Scrolling and display don't look good.

    I prefer how Kiro IDE does it by showing you the terminal activities live in a normal IDE terminal panel. I can run my own commands in the terminal session, stop or kill that session easily. It's like owning full control of the terminal and the agent uses or creates new ones at will.

  10. zakinadhif commented on Jul 24, 2026

    @zakinadhif

    Claude Code already have this, when will Codex CLI have it :)

  11. sean-cortical commented on Aug 18, 2026

    @sean-cortical

    This is what I like the most about vs-code's copilot is that it opens a regular terminal that i can auth in if i need, and see whats happening so i can remain in control

  12. etraut-openai commented on Oct 12, 2026

    @etraut-openai
    Contributor

    /ps is implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions