Current Status
State: Completed; PR #220 merged.
Next action: None for this issue.
Blocked by: None.
Waiting for: Nothing.
Last verified: 2026-05-29. PR #220 merged into main at 66fa099361510f8d3ca60bbc4603102db56dc318; remote task branch was deleted.
Implementation:
- Ported the stale-slot behavior concept from OpenAI
e2551a5e36 into Every Code's editable AgentManager model.
- Every Code's equivalent explicit close operation is
agent.cancel; it now treats an active agent record with no task handle as stale, marks it Cancelled, stamps completion time, finalizes terminal state, and returns success.
- Added regression
cancel_agent_reaps_stale_active_record_without_handle.
Validation:
cargo test -p code-core cancel_agent_reaps_stale_active_record_without_handle
./build-fast.sh
- JetBrains changed-files inspection clean: 0 problems.
Finish Line
Every Code releases stale multi-agent capacity when a spawned agent/thread disappears before explicit close, with a regression test covering the stuck-slot scenario.
Acceptance Criteria
Notes
This is a product hardening port, not a mechanical upstream import. The source fix touches codex-rs/core/src/agent/control.rs and codex-rs/core/src/tools/handlers/multi_agents*, while Every Code's editable implementation has diverged.
Current Status
State: Completed; PR #220 merged.
Next action: None for this issue.
Blocked by: None.
Waiting for: Nothing.
Last verified: 2026-05-29. PR #220 merged into
mainat66fa099361510f8d3ca60bbc4603102db56dc318; remote task branch was deleted.Implementation:
e2551a5e36into Every Code's editableAgentManagermodel.agent.cancel; it now treats an active agent record with no task handle as stale, marks itCancelled, stamps completion time, finalizes terminal state, and returns success.cancel_agent_reaps_stale_active_record_without_handle.Validation:
cargo test -p code-core cancel_agent_reaps_stale_active_record_without_handle./build-fast.shFinish Line
Every Code releases stale multi-agent capacity when a spawned agent/thread disappears before explicit close, with a regression test covering the stuck-slot scenario.
Acceptance Criteria
e2551a5e36behavior to Every Code'scode-rsmulti-agent implementation rather than cherry-picking read-onlycodex-rspaths../build-fast.sh.Notes
This is a product hardening port, not a mechanical upstream import. The source fix touches
codex-rs/core/src/agent/control.rsandcodex-rs/core/src/tools/handlers/multi_agents*, while Every Code's editable implementation has diverged.