Repository navigation
fix(debug): a fresh session's debug bundle finds its own proxy run - #1399
Closed
Juliusolsson05 wants to merge 2 commits into
Closed
Juliusolsson05 wants to merge 2 commits into
Juliusolsson05 wants to merge 2 commits into
Conversation
…xy run (#1336) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… guard branches (review a) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Disposition for review a (head
|
Owner
Author
|
Status (W1): held and recommended to close in favour of #1405. Review b is FIX-BEFORE-MERGE, and its finding is structural:
The correct fix is #1405: record each process's proxy run (segment + run dir) at launch, keep it on the pane, and bundle exactly that run. That touches the spawn plumbing ( |
Owner
Author
|
Closed by B6 (manager, owner proxy) during the owner's PR freeze: the fix needs a launch-time run identity (tracked in #1405), which is new work under the freeze. Nothing is deleted. The branch stays on origin and the PR can be reopened. The linked issue stays open with this PR's findings as its starting point. |
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.
Part of #1336. It is the Agent Code side of Juliusolsson05/codex-headless#70, whose review a (P1) found this.
Problem
resume-<id>when the process was launched to resume a known conversation, elseshell-<sessionId>. SeecodexSession.tsallocateProxyEventsFileandclaudeSession.ts:352.providerSessionIdfrom its first turn, after the run dir already exists undershell-<sessionId>, and nothing renames it.assembleAndSaveDebugBundlethen asked only forresume-<providerSessionId>.match: 'none', so every manual bundle of a fresh session that had taken a turn had no proxy section at all: no events tail, nolatest-request-body.json. That holds for Codex and Claude alike.Change
When
resume-<id>finds nothing, the bundle retries with the pane's ownshell-<sessionId>key.shell-<sessionId>can only find this pane's own run. The IPC shape is unchanged.resume-<id>names a conversation, not a pane. A pane whose conversation was later resumed in another pane can bundle that other pane's run. Main already asked only forresume-, so this PR neither adds nor fixes that. The fix, recording each pane's launch-time proxy key, is filed as bug(debug): a bundle picks the proxy run by conversation key, so it can bundle another pane's resumed run #1405.resume-stays first, because a resumed process writes there.Tests (
saveDebugBundle.renderer.test.ts, real bundle assembly,window.apistubbed asreadProxyEventsForBundleanswers)shell-pane-1, with provider idthread-1: the bundle asks forresume-thread-1and thenshell-pane-1, and carries the proxy file. Red on main.resume-thread-1is asked for.nonefallback answer, now fails.Verification
npx tsc -bclean atedac9741.src/renderer/src/features/debugandproxyEventsReader.test.ts: 10 files, 63 tests.Follow-up in this issue
Bumping
packages/codex-headlessto codex-headless#70, and updatingproxyEventsReader.ts's sidecar comment for the Codex invariant, both wait until #1366 (which moves the same gitlink) and codex-headless#70 merge.🤖 Generated with Claude Code