Skip to content

Agent stuck on "Waited for background terminal" after command finishes #14314

@no1x0

Description

@no1x0

What version of Codex CLI is running?

0.114.0

What subscription do you have?

plus

Which model were you using?

gpt-5.4 xhigh

What platform is your computer?

Linux 6.12.73+deb13-amd64 x86_64 unknown

What terminal emulator and version are you using (if applicable)?

terminator 2.1.4 (on debian)

What issue are you seeing?

The agent ran a background command (cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings). The command finished execution and printed a compilation error to the terminal. However, the agent failed to detect the completion or read the output. Instead, it got stuck in an infinite loop, continuously logging • Waited for background terminal until I manually interrupted the process.

What steps can reproduce the bug?

Ask the agent to run a background command that results in a compilation error (in my case, cargo clippy).

The terminal successfully outputs the compilation error.

Observe the agent failing to read the output and continuously logging "Waited for background terminal".

Uploaded thread: 019cd87a-6be6-7662-8cec-0dfd3a6b6ee3

What is the expected behavior?

The agent should successfully detect when the background terminal process finishes, read the output (the compilation error), and proceed to analyze or fix the error instead of getting stuck in a waiting loop.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentIssues related to the core agent loopbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions