feat: enable Codex image support for resumed sessions (local + SSH)#375
Merged
pedramamini merged 5 commits intoRunMaestro:mainfrom Feb 16, 2026
Merged
feat: enable Codex image support for resumed sessions (local + SSH)#375pedramamini merged 5 commits intoRunMaestro:mainfrom
pedramamini merged 5 commits intoRunMaestro:mainfrom
Conversation
Set supportsImageInputOnResume to true for Codex agent and remove the blockCodexResumeImages blocking logic from App.tsx. Images will be written to disk with paths embedded in prompt text as a workaround since codex exec resume doesn't support the -i flag. Removes: blockCodexResumeImages variable, showImageAttachBlockedNotice callback, paste/drop handler image blocks, and unused getProviderDisplayName import. Refs: RunMaestro#323 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…essions When Codex resumes a session with `codex exec resume`, the -i flag is not supported. This adds a new imageResumeMode capability that triggers an alternative image handling path: images are saved to temp files and their paths are embedded as a text prefix in the prompt instead of using -i args. - Add imageResumeMode?: 'prompt-embed' to AgentCapabilities interface - Add buildImagePromptPrefix() utility in imageUtils.ts - Split ChildProcessSpawner Branch 2 into resume vs initial spawn paths - Ensure modified prompt flows through stdin handling for Windows support Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add imageResumeMode option to buildSshCommandWithStdin() that embeds image file paths in the prompt/stdinInput instead of adding -i CLI args when resuming Codex sessions over SSH. The IPC handler detects resume mode via agentSessionId + imageResumeMode capability and passes the flag through to the SSH command builder. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When remote temp image files are created on the SSH host (for Codex/OpenCode image support), the shell script now runs the agent command without `exec` so that cleanup `rm -f` commands execute after the agent exits. When no temp files exist, the existing `exec` behavior is preserved. Also adds `remoteTempImagePaths` to the `SshCommandResult` return type for informational purposes, and updates/adds comprehensive tests for the exec/no-exec cleanup behavior and return value. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…sions Resolved merge conflicts in ChildProcessSpawner.ts and applied fixes: - CRITICAL: Restore promptAddedToArgs tracking in both image branches (resume-with-prompt-embed and initial-spawn). Without this, the stream-json stdin writer would double-send prompts to Codex agents, re-introducing the bug fixed in 6097736. - DRY: Use shared buildImagePromptPrefix() in ssh-command-builder.ts instead of inline duplicate. - Remove imageResumeMode: undefined noise from all non-Codex agent definitions (optional field, DEFAULT_CAPABILITIES omits it). - Remove dead onPromptImageAttachBlocked={undefined} prop from App.tsx. - Update capability tests for optional imageResumeMode field.
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
This PR enables image inputs when resuming Codex sessions by switching from CLI image flags to prompt-embedded temp file paths in resume mode.
Previously, Codex resume flows could not consume images because codex exec resume does not accept -i. This change introduces a resume-specific image strategy that works for both local and SSH execution paths.
What changed
Validation
Ran targeted tests:
pm test -- src/tests/main/process-manager/utils/imageUtils.test.ts src/tests/main/process-manager/spawners/ChildProcessSpawner.test.ts src/tests/main/utils/ssh-command-builder.test.ts src/tests/main/agents/capabilities.test.ts
Result: 4 files passed, 128 tests passed, 0 failed.
Validation on local/ssh
closes #323