Skip to content

Windows: Open/attach background terminal session in a new Windows Terminal tab (PowerShell-friendly) #8650

Closed as not planned

Description

@SlipstreamAI

What feature would you like to see?

Summary

When Codex runs a long-lived/background terminal session, add a way to view/attach it in a separate terminal tab (or pane) in Windows Terminal so I can keep my main Codex chat flow in one tab while watching logs/output in another.

Problem / Motivation

Background terminal sessions are most useful when:

  • I can keep working in the main Codex session
  • while simultaneously watching build/test/dev-server logs
  • without copy/pasting commands or losing context

Today, background execution is trending toward being possible (and there are active discussions/PRs about background job management),
but there’s no first-class “show this background session in another tab/pane” workflow for Windows users.

Related issues

Proposed solution

1) Introduce an “attach/view” command

Add a stable way to attach to a running background terminal session:

  • codex bg list
  • codex bg attach <session_id> (stream output + allow interaction if supported)
  • codex bg logs <session_id> --follow (read-only mode is fine as a v1)

2) Windows Terminal integration: open in new tab/pane

Add a convenience flag that launches the viewer in a new Windows Terminal tab:

  • codex bg attach <id> --new-tab
  • (optional) --split-pane for a side-by-side view

Implementation idea (Windows-only):

  • Use wt to open a new tab/pane targeting the current window (wt -w 0 new-tab ... / split-pane ...)
  • Run codex bg attach <id> (or codex bg logs <id> --follow) inside that tab.

Windows Terminal supports scripted tab/pane creation via wt and commands like new-tab / split-pane.

3) UX/guardrails

  • If Windows Terminal isn’t available, fall back to:
    • printing a one-liner the user can run, or
    • opening a new console window with the same command
  • If interactive attach is hard, ship v1 as logs-only follow.

Acceptance criteria

  • Can start background sessions and list them (id/name/status) using /ps more dynamically.
  • Can attach or follow logs for a specific session
  • On Windows Terminal: --new-tab opens a new tab running the attach/log command
  • Clear docs + examples for PowerShell users
  • Stays open but finishes with a prompt that asks permission before closing the tab.

Additional information

No response

Activity

  1. added
    CLIIssues related to the Codex CLI
    windows-osIssues related to Codex on Windows systems
    on Jan 1, 2026
  2. added
    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal display
    and removed
    CLIIssues related to the Codex CLI
    on Feb 4, 2026
  3. etraut-openai commented on Feb 23, 2026

    @etraut-openai
    Contributor

    This feature request hasn't received any upvotes, so I'm going to close it.

  4. NightMachinery commented on Mar 22, 2026

    @NightMachinery

    Is there a way to do this in Linux?

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 requestwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions