fix(coding-agent): await post-compaction continuation - #881
Open
parkerpettit9 wants to merge 1 commit into
Open
Conversation
parkerpettit9
force-pushed
the
fix/acp-post-compaction-continuation
branch
from
August 7, 2026 20:23
eed86ac to
2dcf7a3
Compare
parkerpettit9
marked this pull request as ready for review
August 7, 2026 20:27
parkerpettit9
force-pushed
the
fix/acp-post-compaction-continuation
branch
from
August 7, 2026 20:40
2dcf7a3 to
01a590f
Compare
parkerpettit9
changed the base branch from
main
to
fix/acp-prompt-waits-for-idle
August 7, 2026 20:40
parkerpettit9
marked this pull request as draft
August 7, 2026 20:40
parkerpettit9
marked this pull request as ready for review
August 7, 2026 20:42
zhengr
pushed a commit
to zhengr/prime-agent
that referenced
this pull request
Aug 8, 2026
… prompts (PrimeIntellect-ai#881) * feat(extensions): add inline-bash example for expanding !{command} in prompts Adds an example extension that expands inline bash commands within user prompts before sending to the agent. Uses the `input` event to transform patterns like `!{pwd}` or `!{git status}` into their output. Preserves existing `!command` whole-line bash behavior. * docs(extensions): add inline-bash to README * chore: fix stupid bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
compact.runstops the current agent loop, compacts, then schedules a continuation. That scheduled work was not part ofwaitForIdle(), so ACP could return a silentend_turnbefore the continuation started.Track the scheduled continuation in the session idle contract so headless clients wait for the resumed turn.
Verification:
npm run checknpx tsx ../../node_modules/vitest/dist/cli.js --run test/suite/acp-mode.test.tsNote
Fix premature
end_turnin ACP mode by awaiting post-compaction continuationACP previously returned a silent
end_turnbefore a compaction-triggered continuation had a chance to resume the agent.AgentSessionnow tracks post-compaction continuation settlement via a promise, and the idle-drain loop awaits it before reporting idle. Cancelling a scheduled continuation also resolves the promise so no waiters hang indefinitely.Macroscope summarized 01a590f.
Note
Medium Risk
Touches the session idle gate, ACP turn boundaries, and daemon worker relaunch env—incorrect timing could still false-quiesce or strand workers, but changes are heavily tested and client-owned credentials stay out of resident descriptors.
Overview
Fixes headless and ACP clients finishing a turn before compaction-scheduled work runs, by tracking a settlement promise in
AgentSession.waitForIdle()so timer-driven post-compaction continuations are part of the idle contract (including cancel/reschedule paths).ACP now treats
session/promptas admissible only after an extrawaitForIdle(), emitsquiescence_meta(outstanding subagents + remaining autonomous continuations from a live roster snapshot), hardenssession/newagainst concurrent creation and failed initial snapshots, and adjusts daemon attach so reattachable ACP sessions use resident lifecycle while still forwardinglaunchEnvfor model/proxy credentials.Daemon supervisor persists
launchEnvon resident worker descriptors (not client-owned) and reapplies it on worker relaunch after supervisor restart; tests cover ACP kernel namespace reconnect and resident env recovery.Reviewed by Cursor Bugbot for commit 01a590f. Bugbot is set up for automated code reviews on this repo. Configure here.