close_agent is missing from the VS Code multi-agent tool schema

Open
#36,211 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
64/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust, vscode
Domain
devtools

Research direction

Reproduce the issue with multi_agent enabled in ~/.codex/config.toml and the VS Code Remote - WSL setup, then search the Rust and VS Code extension code for the collaboration-tool schema and close_agent. Trace why the callable schema omits that operation. Done means a new chat exposes the complete lifecycle, including close_agent, with coverage for the reported workflow if the existing test structure supports it.

Written by the indexing model from the issue text.

Description

bug extension subagent windows-os
What version of the IDE extension are you using?

26.721.41059

What subscription do you have?

ChatGPT Plus

Which IDE are you using?

Visual Studio Code 1.131.0 using Remote - WSL

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

In new Codex chats opened through the VS Code extension, close_agent is missing from the callable collaboration-tool schema even though multi_agent is enabled.

The affected sessions expose:

  • spawn_agent
  • followup_task
  • send_message
  • interrupt_agent
  • list_agents
  • wait_agent

They do not expose close_agent.

This is partial tool exposure: multi-agent support is available, but the operation needed to close a completed subagent is missing. interrupt_agent is not a replacement because it only interrupts the agent's current turn and explicitly leaves the agent available.

The issue persists after updating the extension, completely restarting VS Code, and creating multiple brand-new chats.

What steps can reproduce the bug?
  1. Enable multi-agent support in ~/.codex/config.toml:

    [features]
    multi_agent = true
    
  2. Restart VS Code and open a Git repository through Remote - WSL.

  3. Open a new Codex chat and send this exact request:

    Use a subagent to list the repository's top-level files. Wait for the subagent to finish, close it using close_agent, and report the lifecycle operations you performed.
    
  4. Observe that the session can access spawn_agent and wait_agent, but cannot perform the requested cleanup because close_agent is absent from its callable tool schema. The available cleanup-adjacent operation is interrupt_agent, which interrupts the current turn but leaves the agent available.

What is the expected behavior?

With stable multi_agent enabled, every new VS Code Codex chat should receive the complete documented collaboration lifecycle, including a callable close_agent operation.

A workflow should be able to:

  1. spawn a child agent;
  2. wait for its result;
  3. explicitly close the child;
  4. verify that the child reached a terminal state and its slot was reclaimed.

If close_agent has intentionally been replaced, the extension should expose and document an equivalent finalization operation. interrupt_agent should not be treated as equivalent to lifecycle closure.

Additional information

The Codex runtime bundled with the affected extension reports:

codex-cli 0.146.0-alpha.3.1

Relevant configuration:

[features]
multi_agent = true

The VS Code workspace is opened through Remote - WSL with Ubuntu 24.04.4 LTS. The Windows host platform is recorded in the dedicated platform field above.

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.