fix(coding-agent): honor cross-project fork confirmations - #1098
Open
realsigridjin wants to merge 2 commits into
Open
fix(coding-agent): honor cross-project fork confirmations#1098realsigridjin wants to merge 2 commits into
realsigridjin wants to merge 2 commits into
Conversation
Resolve affirmative answers before closing readline so the close fallback cannot abort the fork. Ultraworked with [omo](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
Record the user-facing cross-project confirmation fix for the changelog gate. Ultraworked with [omo](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
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.
Summary
yandyesreach the fork pathcreateSessionManager()interactive branch and verify the fork gets a new ID and the current-project cwdpackages/coding-agent/src/changes.mdand the user-facing fix in the coding-agent changelogRegression
#756 added a
closefallback for unanswered confirmations. Node's readline emitsclosesynchronously, so the previousrl.close()-then-resolve(answer)order let the fallback settle the promise asfalsefirst. An affirmative response therefore printedAborted.instead of forking.The production fix is the minimal ordering change: settle the parsed answer, then close readline. Cancel, empty-input, EOF, non-interactive, local-session, and explicit
--forkbehavior remain unchanged.Prior work
Supersedes #1042, opened by @beengineer500, which identified the readline close-ordering race and proposed settling the confirmation before closing readline. This adaptation rebases that fix onto current main and covers it through the existing #756 cross-project session regression using the real session-fork path, without exporting the confirmation helper.
Validation
Aborted.and never emittedSESSION_FORKEDnpm run checknpm run buildgit diff --checksenpi-qagates:ycreated one fork with a new ID and target-project cwdnand an empty answer aborted without a fork--helpexposed the session and fork options