Skip to content

fix: pin Codex compact-kill waiter rejection - #551

Closed
ladydd wants to merge 3 commits into
LodyAI:mainfrom
ladydd:fix/pin-codex-compact-kill-waiters
Closed

ladydd wants to merge 3 commits into
LodyAI:mainfrom
ladydd:fix/pin-codex-compact-kill-waiters

Conversation

@ladydd

@ladydd ladydd commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Related issue

Closes #550

Depends on LodyAI/acp-extension-codex#38. Review this host PR, then merge the adapter first and this pin second. Do not ship a desktop release until that adapter merge exists.

Problem / pressure

/compact waits on a thread/compacted notification. Turn waiters already reject when the Codex process exits; compaction waiters were resolve-only. If app-server dies after thread/compact/start, the ACP prompt never finishes. Host Stop does not clear it. The next prompt is already active. Healthy compact still works. Mid-turn process death already returns -32603. This is the compact waiter hole, not the fork hang (#543 / #544) and not adapter #30 (stop during compact).

Summary

Pin acp-extension-codex to 31c5ecc (adapter #38, rebased onto current adapter main / 314b3823) so close/dispose rejects compaction waiters. Other submodules stay on current main.

Visual explanation

sequenceDiagram
  participant Host
  participant Adapter
  participant Codex
  Host->>Adapter: prompt /compact
  Adapter->>Codex: thread/compact/start
  Codex-->>Adapter: start ok
  Note over Codex: process exits
  Note over Adapter: before: wait forever for thread/compacted
  Host->>Adapter: session/prompt
  Adapter-->>Host: already active
  Note over Adapter: after: close rejects waiter, prompt returns -32603
Loading

Before / after

Before After
/compact + process death stays compacting; Stop then already active Prompt returns -32603; next prompt is not already active
Healthy /compact Unchanged
Main pins Codex 314b3823 (host #275 / adapter cancel-compaction) Codex 31c5ecc (#38 on top of that main)

Test plan

  • Adapter unit: vitest run src/__tests__/CodexAppServerClient.test.ts --no-file-parallelism --retry=0 — 7 passed, including close while start is still in flight.
  • Independent adapter check (Codex 0.153.4, synthetic model, rebuilt bundle of this patch): compact-kill returned -32603 in 10ms with no already active; restart + loadSession then history, a normal prompt, and another compact all completed. Lifecycle 8/8 included real vscode-jsonrpc close while start was pending. Related adapter regression 130 passed; the known /review slash-command timeout is a pre-existing baseline skip.
  • Host change is the gitlink plus Agent Notes. pnpm run docs check reported no errors on the new note pair; the command still fails on pre-existing broken links in unrelated notes/specs. Full pnpm check was not re-run on this pin-only host worktree.
  • Not claimed: in-window Electron compact-kill on this host pin. Acceptance was adapter protocol plus host -32603 classification.

Context handoff

Instructions for reviewing agents

Authoring context

Original user prompt

Codex compact-kill should reject waiters instead of hanging.

@ladydd
ladydd marked this pull request as ready for review September 9, 2026 14:08
@ladydd
ladydd force-pushed the fix/pin-codex-compact-kill-waiters branch from 6cb4a82 to 9232a8b Compare September 11, 2026 06:27
@github-actions github-actions Bot added the status:needs-pr-attention External PR needs contributor attention before review label Sep 11, 2026
@ladydd

ladydd commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Retargeted the gitlink onto current main: 5f0aab0f (#554) → a67f231 (adapter #38 rebased onto that main). Notes updated. Still depends on adapter #38 merging first; other submodules unchanged.

Pin acp-extension-codex to a67f231 (LodyAI/acp-extension-codex#38,
rebased onto current adapter main / 5f0aab0) so compaction waiters
reject when the Codex process exits. Other submodules stay on current
main.

Depends on adapter LodyAI#38. Do not ship a desktop release until that merge.

Closes LodyAI#550
Agent Note for pinning acp-extension-codex a67f231 (adapter LodyAI#38) so
/compact does not hang when the process exits after start.
Pin acp-extension-codex 314b3823 → 31c5ecc (adapter LodyAI#38 rebased onto
adapter main after LodyAI#30).

Model: grok-4.6
@ladydd
ladydd force-pushed the fix/pin-codex-compact-kill-waiters branch from 9232a8b to 168809d Compare September 12, 2026 16:22
@ladydd

ladydd commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main. Codex gitlink is now 314b382331c5ecc (adapter #38 rebased onto adapter main after #30). Adapter tests: CodexAppServerClient 7 passed.

@ladydd ladydd closed this Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Codex /compact stays active after app-server exits

1 participant