Skip to content

[Bug]: Provider-native Codex subagent keeps running and editing files after parent thread rollback #46954

Done

Description

@fauzaanu

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Start a Codex thread (full-access) in a local workspace.
  2. Send a prompt that spawns a provider-native Codex subagent (subAgentActivity) running asynchronously in codex app-server.
  3. Before the subagent finishes, interrupt and roll back the parent thread (e.g., to switch models).
  4. Observe the subagent thread (thread:subagent:*) and the workspace filesystem.

Expected behavior

  • Rolling back or unsubscribing a parent thread should interrupt and clean up all descendant provider-native subagent threads (turn/interrupt + thread/unsubscribe) so no post-rollback commands or file edits run.
  • Actively running provider-native subagents (thread/status/changed → active, turn/started) should be projected as active with a working stop/interrupt control.

Actual behavior

Impact

Major degradation or frequent failure

Version or commit

0.1.13 (bc0f04d)

Environment

T3 Code Beta (com.t3tools.t3code), macOS 27.2.1 (26B131, arm64), codex-cli 0.172.0

Logs or stack traces

# Verified deterministically on codex app-server 0.172.0 (-c thread_unload_delay_secs=0):
# Parent-only turn/interrupt -> thread/revert (thread/reverted) -> thread/unsubscribe (thread/closed)
# Result: child thread emitted 17 more notifications and wrote a file to disk ~14.4s after parent
# thread/reverted (~14.3s after thread/closed). codex app-server does not cascade revert/unsubscribe
# from parent to child threads.

Workaround

Manually kill -9 the codex app-server (and child codex-code-mode-host) OS process.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions