[codex] Fix Codex resume and subagent lifecycle routing#389
Draft
duxiaoxiong wants to merge 82 commits intotiann:mainfrom
Draft
[codex] Fix Codex resume and subagent lifecycle routing#389duxiaoxiong wants to merge 82 commits intotiann:mainfrom
duxiaoxiong wants to merge 82 commits intotiann:mainfrom
Conversation
Root causes:\n- mobile composer still relied on assistant-ui attachment state, which was brittle on Android/PWA and could open the picker without surfacing an uploaded attachment in the composer\n- attachment uploads for inactive sessions did not consistently reuse the same resume/session-resolution flow as text sends\n- hub HTTP routes inherited Bun's socket handler maxRequestBodySize, which was ~1MB from @socket.io/bun-engine, so a normal 2.06MB JPEG was rejected with HTTP 413 before the upload route logic even ran\n\nFixes:\n- replace the mobile attachment entry with a native label/input picker and move composer attachment state to HAPI-managed state in HappyComposer\n- route picker uploads and pasted images through shared upload/delete helpers that resolve the active session before uploading\n- reuse the router's session-resolution and navigation callbacks for attachment sends so uploads follow the same resume path as text sends\n- raise normal HTTP request body handling to at least 100MB instead of inheriting the socket engine's 1MB ceiling\n- add focused web and hub tests for the attachment flow and request-body-size floor\n\nResult:\n- Android can now select an image, see it appear in the composer, send it through the normal message path, and upload files larger than the old 1MB server ceiling
Add a read-only Session Info entry under the session header's More menu. The dialog exposes agent flavor, working directory, HAPI session id, and the imported source session id without adding noise to the main chat view. Includes i18n strings and a focused SessionHeader test.
… vite allowedHosts - Generalize MessageQueue2 from string to generic TMessage for agent-neutral queuing - Add attachment-to-input mapping in appServerConfig for mobile image uploads - Extract vite allowedHosts into configurable helper with env var support - Make React Query devtools conditional on VITE_SHOW_QUERY_DEVTOOLS env var - Harden sessionScanner null returns and remote launcher test coverage via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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
Root cause
Codex had multiple mismatches across replay and live paths:
Impact
Validation
Verified on Linux
cd web && bun run test -- src/chat/codexSidechain.test.ts src/chat/reducer.test.ts src/components/AssistantChat/messages/CodexSubagentPreviewCard.test.tsx && bun run typecheckcd cli && bun run test -- src/codex/codexRemoteLauncher.test.ts src/codex/utils/appServerEventConverter.test.ts src/codex/utils/codexSessionScanner.test.ts src/codex/utils/codexEventConverter.test.ts && bun run typecheck/home/xiaoxiong/papers/paper_processmacOS