Skip to content

update summary to auto#1

Merged
tibo-openai merged 1 commit into
mainfrom
dev/tcreech/auto-summary
Apr 16, 2025
Merged

update summary to auto#1
tibo-openai merged 1 commit into
mainfrom
dev/tcreech/auto-summary

Conversation

@trevorcreech

Copy link
Copy Markdown
Contributor

No description provided.

@trevorcreech trevorcreech requested a review from ibigio April 16, 2025 16:59
@tibo-openai tibo-openai merged commit 443ffb7 into main Apr 16, 2025
@tibo-openai tibo-openai deleted the dev/tcreech/auto-summary branch April 16, 2025 17:44
rumple pushed a commit to rumple/codex that referenced this pull request Apr 24, 2025
shepting pushed a commit to shepting/codex that referenced this pull request Sep 16, 2025
@mzltest mzltest mentioned this pull request Sep 24, 2025
DioNanos referenced this pull request in DioNanos/codex-termux Nov 15, 2025
Critical bugfix - auto-update detection now working

Fixes:
- Version parser now handles -termux suffix correctly
- Tag parser accepts both rust-v* and v*-termux formats
- Added test coverage for Termux tag validation

Technical details:
- v0.58.0 upstream merge overwrote -termux suffix support
- New upstream code rejected v*-termux tag format
- Prevented version.json creation and update notifications

Affected versions: v0.58.0 through v0.58.3

Termux patches (4 total):
- Patch #1: Browser login fix (termux-open-url)
- Patch #2: RAM optimizations (lto=false, codegen-units=16)
- Patch #3: Auto-update URL (@mmmbuto/codex-cli-termux)
- Patch #4: Auto-update detection (this release)
DioNanos referenced this pull request in DioNanos/codex-termux Nov 21, 2025
Upstream changes (40+ commits):
- New: codex-shell-tool-mcp MCP server
- New: execpolicycheck CLI command
- New: TUI animations toggle feature
- New: Shell timeout increased to 1 hour
- Refactor: execpolicy migration (execpolicy2 -> execpolicy)
- Removed: tiktoken-rs, shell_command feature
- Improved: FreeBSD portability, fuzzy search (8->20 results)

Termux patches verified compatible:
- #1 Browser login (termux-open-url) ✅
- #2 RAM optimizations (lto=false, codegen-units=16) ✅
- #8 Bash execution (sandbox, LD_*, shell detection) ✅
- #9 Auto-update execution ✅

Stats: 195 files changed, +5915 insertions, -2293 deletions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
DioNanos referenced this pull request in DioNanos/codex-termux Nov 27, 2025
- 8 new tests to validate Termux patches after upstream merge
- Critical tests for Patch #1, #2, #4, #9 (conflicting patches)
- Test auto-update execution, browser login, RAM optimization
- Essential for post-merge validation before npm publish

Test suite v1.2 → v1.3 (90 total tests)
DioNanos referenced this pull request in DioNanos/codex-termux Nov 27, 2025
Merged 61 commits from openai/codex upstream (Nov 21-27, 2025).

✅ ALL TERMUX PATCHES PRESERVED:
- Patch #1: Browser login (termux-open-url) - VERIFIED ✅
- Patch #2: RAM optimization (lto=false) - VERIFIED ✅
- Patch #4: Auto-update URL (DioNanos/codex-termux) - VERIFIED ✅
- Patch #5: Version parser (-termux suffix) - VERIFIED ✅
- Patch #6: NPM package name (@mmmbuto/codex-cli-termux) - VERIFIED ✅
- Patch #9: Auto-update execution (npm install) - VERIFIED ✅

NEW UPSTREAM FEATURES:
- Enterprise skip upgrade config (check_for_update_on_startup)
- Unified exec pruning strategy
- Custom env for unified exec process
- Compaction events
- Thread/turn ID in notifications
- Config management app-server
- Cargo audit workflow + cargo-deny
- NetBSD build fixes
- Windows sandbox enhancements
- Documentation improvements

UPSTREAM CHANGES:
- 232 files changed
- +11247 insertions, -7808 deletions
- New codex-api/ and codex-client/ crates
- Rollout session error improvements
- Apply patch parsing fixes

CONFLICTS RESOLVED:
- README.md: Merged Testing section (Termux) + Documentation links (upstream)

NEXT: Compilation + Category 13 test suite validation
DioNanos referenced this pull request in DioNanos/codex-termux Jan 8, 2026
…8+ requirement

- Upstream: OpenAI Codex rust-v0.79.0
- Termux patches validated: #1-#6, #8, #9
- Testing: 47/49 passed (2 skipped: WebSearch, Git)
- Documentation:
  - Added GLM-4.7 quickstart guide (docs/GLM4.7-quickstart.md)
  - Updated README with GLM-4.7 Path 2 in Quickstart
  - Node.js requirement updated to >=18 (recommended >=22)
  - Web search safety warning added
  - Tagline updated to "Built from upstream"
- Package: npm-package synced with main README
- Binaries: codex (59M), codex-exec (34M), codex-tui (41M) verified
charley-oai added a commit that referenced this pull request Jan 9, 2026
charley-oai added a commit that referenced this pull request Jan 10, 2026
Agent wouldn't "see" attached images and would instead try to use the
view_file tool:
<img width="1516" height="504" alt="image"
src="https://github.com/user-attachments/assets/68a705bb-f962-4fc1-9087-e932a6859b12"
/>

In this PR, we wrap image content items in XML tags with the name of
each image (now just a numbered name like `[Image #1]`), so that the
model can understand inline image references (based on name). We also
put the image content items above the user message which the model seems
to prefer (maybe it's more used to definitions being before references).

We also tweak the view_file tool description which seemed to help a bit

Results on a simple eval set of images:

Before
<img width="980" height="310" alt="image"
src="https://github.com/user-attachments/assets/ba838651-2565-4684-a12e-81a36641bf86"
/>

After
<img width="918" height="322" alt="image"
src="https://github.com/user-attachments/assets/10a81951-7ee6-415e-a27e-e7a3fd0aee6f"
/>

```json
[
  {
    "id": "single_describe",
    "prompt": "Describe the attached image in one sentence.",
    "images": ["image_a.png"]
  },
  {
    "id": "single_color",
    "prompt": "What is the dominant color in the image? Answer with a single color word.",
    "images": ["image_b.png"]
  },
  {
    "id": "orientation_check",
    "prompt": "Is the image portrait or landscape? Answer in one sentence.",
    "images": ["image_c.png"]
  },
  {
    "id": "detail_request",
    "prompt": "Look closely at the image and call out any small details you notice.",
    "images": ["image_d.png"]
  },
  {
    "id": "two_images_compare",
    "prompt": "I attached two images. Are they the same or different? Briefly explain.",
    "images": ["image_a.png", "image_b.png"]
  },
  {
    "id": "two_images_captions",
    "prompt": "Provide a short caption for each image (Image 1, Image 2).",
    "images": ["image_c.png", "image_d.png"]
  },
  {
    "id": "multi_image_rank",
    "prompt": "Rank the attached images from most colorful to least colorful.",
    "images": ["image_a.png", "image_b.png", "image_c.png"]
  },
  {
    "id": "multi_image_choice",
    "prompt": "Which image looks more vibrant? Answer with 'Image 1' or 'Image 2'.",
    "images": ["image_b.png", "image_d.png"]
  }
]
```
DioNanos referenced this pull request in DioNanos/codex-termux Jan 10, 2026
- Updated workspace version to 0.80.0-termux
- All Termux patches verified functional (#1-#6, #9 active)
- Patch #8 no longer required (resolved upstream by PR openai#8951)
- Process hardening removed from Codex CLI improves bash execution
- Test suite: 49/49 passed (CODEX_TEST_REPORT_v0.80.0.md)
- Upstream changes:
  * Thread fork endpoints (conversation branching)
  * Requirements/list API
  * Elevated sandbox onboarding NUX
  * Skills explicit invocation via V2 API
  * Metrics capabilities (otel/metrics module)
  * Removed process hardening from Codex CLI
- Binaries compiled: codex (60M), codex-tui (42M), codex-exec (35M), codex-app-server (38M)
- Updated patches/README.md for v0.80.0
DioNanos referenced this pull request in DioNanos/codex-termux Jan 10, 2026
- Remove old test report (CODEX_TEST_REPORT_v0.79.0.md)
- Update version references from 0.79.0 to 0.80.0
- Update upstream reference from rust-v0.79.0 to rust-v0.80.0
- Update test date from 2026-01-08 to 2026-01-10
- Update test results to 49/49 passed (0 skipped)
- Update patch description: 8 patches (#1-#6, #9) - Patch #8 resolved upstream
- Sync npm-package/README.md with root README.md
charley-oai added a commit that referenced this pull request Jan 12, 2026
AIALRA-0 pushed a commit to AIALRA-0/codex-turn-engine that referenced this pull request Jun 10, 2026
…ai#8950)

Agent wouldn't "see" attached images and would instead try to use the
view_file tool:
<img width="1516" height="504" alt="image"
src="https://github.com/user-attachments/assets/68a705bb-f962-4fc1-9087-e932a6859b12"
/>

In this PR, we wrap image content items in XML tags with the name of
each image (now just a numbered name like `[Image openai#1]`), so that the
model can understand inline image references (based on name). We also
put the image content items above the user message which the model seems
to prefer (maybe it's more used to definitions being before references).

We also tweak the view_file tool description which seemed to help a bit

Results on a simple eval set of images:

Before
<img width="980" height="310" alt="image"
src="https://github.com/user-attachments/assets/ba838651-2565-4684-a12e-81a36641bf86"
/>

After
<img width="918" height="322" alt="image"
src="https://github.com/user-attachments/assets/10a81951-7ee6-415e-a27e-e7a3fd0aee6f"
/>

```json
[
  {
    "id": "single_describe",
    "prompt": "Describe the attached image in one sentence.",
    "images": ["image_a.png"]
  },
  {
    "id": "single_color",
    "prompt": "What is the dominant color in the image? Answer with a single color word.",
    "images": ["image_b.png"]
  },
  {
    "id": "orientation_check",
    "prompt": "Is the image portrait or landscape? Answer in one sentence.",
    "images": ["image_c.png"]
  },
  {
    "id": "detail_request",
    "prompt": "Look closely at the image and call out any small details you notice.",
    "images": ["image_d.png"]
  },
  {
    "id": "two_images_compare",
    "prompt": "I attached two images. Are they the same or different? Briefly explain.",
    "images": ["image_a.png", "image_b.png"]
  },
  {
    "id": "two_images_captions",
    "prompt": "Provide a short caption for each image (Image 1, Image 2).",
    "images": ["image_c.png", "image_d.png"]
  },
  {
    "id": "multi_image_rank",
    "prompt": "Rank the attached images from most colorful to least colorful.",
    "images": ["image_a.png", "image_b.png", "image_c.png"]
  },
  {
    "id": "multi_image_choice",
    "prompt": "Which image looks more vibrant? Answer with 'Image 1' or 'Image 2'.",
    "images": ["image_b.png", "image_d.png"]
  }
]
```
AIALRA-0 pushed a commit to AIALRA-0/codex-turn-engine that referenced this pull request Jun 10, 2026
I've seen this test fail with:

```
 - Mock openai#1.
        	Expected range of matching incoming requests: == 2
        	Number of matched incoming requests: 1
```

This is because we pop the wrong task_complete events and then the test
exits. I think this is because the MCP events are now buffered after
openai#8874.

So:
1. clear the buffer before we do any user message sending
2. additionally listen for task start before task complete
3. use the ID from task start to find the correct task complete event.
AIALRA-0 pushed a commit to AIALRA-0/codex-turn-engine that referenced this pull request Jun 10, 2026
Fixes openai#9050

When a draft is stashed with Ctrl+C, we now persist the full draft state
(text elements, local image paths, and pending paste payloads) in local
history. Up/Down recall rehydrates placeholder elements and attachments
so styling remains correct and large pastes still expand on submit.
Persistent (cross‑session) history remains text‑only.

Backtrack prefills now reuse the selected user message’s text elements
and local image paths, so image placeholders/attachments rehydrate when
rolling back.

External editor replacements keep only attachments whose placeholders
remain and then normalize image placeholders to `[Image openai#1]..[Image #N]`
to keep the attachment mapping consistent.

Docs:
- docs/tui-chat-composer.md

Testing:
- just fix -p codex-tui
- cargo test -p codex-tui

Co-authored-by: Eric Traut <etraut@openai.com>
AIALRA-0 pushed a commit to AIALRA-0/codex-turn-engine that referenced this pull request Jun 10, 2026
…i#10590)

## Summary
This PR makes app-server-provided image URLs first-class attachments in
TUI, so they survive resume/backtrack/history recall and are resubmitted
correctly.

<img width="715" height="491" alt="Screenshot 2026-02-12 at 8 27 08 PM"
src="https://github.com/user-attachments/assets/226cbd35-8f0c-4e51-a13e-459ef5dd1927"
/>

Can delete the attached image upon backtracking:
<img width="716" height="301" alt="Screenshot 2026-02-12 at 8 27 31 PM"
src="https://github.com/user-attachments/assets/4558d230-f1bd-4eed-a093-8e1ab9c6db27"
/>

In both history and composer, remote images are rendered as normal
`[Image #N]` placeholders, with numbering unified with local images.

## What changed
- Plumb remote image URLs through TUI message state:
  - `UserHistoryCell`
  - `BacktrackSelection`
  - `ChatComposerHistory::HistoryEntry`
  - `ChatWidget::UserMessage`
- Show remote images as placeholder rows inside the composer box (above
textarea), and in history cells.
- Support keyboard selection/deletion for remote image rows in composer
(`Up`/`Down`, `Delete`/`Backspace`).
- Preserve remote-image-only turns in local composer history (Up/Down
recall), including restore after backtrack.
- Ensure submit/queue/backtrack resubmit include remote images in model
input (`UserInput::Image`), and keep request shape stable for
remote-image-only turns.
- Keep image numbering contiguous across remote + local images:
  - remote images occupy `[Image openai#1]..[Image #M]`
  - local images start at `[Image #M+1]`
  - deletion renumbers consistently.
- In protocol conversion, increment shared image index for remote images
too, so mixed remote/local image tags stay in a single sequence.
- Simplify restore logic to trust in-memory attachment order (no
placeholder-number parsing path).
- Backtrack/replay rollback handling now queues trims through
`AppEvent::ApplyThreadRollback` and syncs transcript overlay/deferred
lines after trims, so overlay/transcript state stays consistent.
- Trim trailing blank rendered lines from user history rendering to
avoid oversized blank padding.

## Docs + tests
- Updated: `docs/tui-chat-composer.md` (remote image flow,
selection/deletion, numbering offsets)
- Added/updated tests across `tui/src/chatwidget/tests.rs`,
`tui/src/app.rs`, `tui/src/app_backtrack.rs`, `tui/src/history_cell.rs`,
and `tui/src/bottom_pane/chat_composer.rs`
- Added snapshot coverage for remote image composer states, including
deleting the first of two remote images.

## Validation
- `just fmt`
- `cargo test -p codex-tui`

## Codex author
`codex fork 019c2636-1571-74a1-8471-15a3b1c3f49d`
Juan-Motta added a commit to Juan-Motta/codewright that referenced this pull request Jun 12, 2026
…h prefixes

Code-review R3: the Contrarian APPROVED (verified the actual projection clean),
but the Codex reviewer OBJECTed on a completeness edge — `(?<![\w/])` did not
cover relative/home path prefixes, so `./codex` → `.codex` and `~/codex` →
`~codex` would still corrupt a path whose final segment is a command name (a
theoretical edge today — the Contrarian confirmed no live occurrence — but a real
incompleteness).

- lib/compile.js — lookbehind widened to `(?<![\w./~])`: the slash-command strip
  now refuses to fire when preceded by a word char, slash, dot, OR tilde, i.e.
  every path/URL prefix. Boundary harness (9 cases) confirms: ./codex, ./codex-pty.sh,
  ~/codex, openai/codex#1, .agents/skills/council/x all PRESERVED; standalone
  /new-feature, `/codex`, (/council), /council-at-start all STRIPPED to bare names.

Full suite 482/482, tsc 0, smoke-ola9b 20/20. Next: R4 objector confirmation (Codex).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
etraut-openai added a commit that referenced this pull request Jun 13, 2026
## Stack

1. [1 of 3] Support long raw TUI goal objectives - #27508
2. [2 of 3] Support long pasted text in TUI goals - #27509
3. **[3 of 3] Support images in TUI goals** - this PR

## Why

The first two PRs make goal definitions resilient to long text, but
`/goal` still dropped image inputs from the composer. That meant a user
could attach images while defining a goal and the resulting goal
continuation would not have any useful reference to those images.

Goal state still persists only objective text, so image inputs need to
become paths or URLs that the agent can read later.

## What Changed

- Extends TUI `GoalDraft` with local image attachments and remote image
URLs.
- Copies local goal images through the app-server filesystem layer into
the managed goal attachment directory, then rewrites active image
placeholders to file references.
- Appends unplaced local images and remote image URLs to the objective
as referenced image files or URLs.
- Preserves goal image metadata through live `/goal` submission and
queued `/goal` dispatch.

## Verification

- Added goal materialization coverage for local image files and remote
image URLs.
- Added/updated TUI slash-command coverage showing `/goal` drafts
include attached images instead of dropping them.

## Manual Testing

- Attached an image by bracketed-pasting its local path into a live
`/goal` composer. The `[Image #1]` placeholder became a server-host
`image-1.png` reference, copied bytes matched exactly, and no attachment
was written under the TUI's local home.
- Deleted an image placeholder before submitting a small goal and
verified no image was copied.
- Attached PNG and JPEG files to the same goal. Placeholder order was
preserved as `image-1.png` and `image-2.jpg`, and both remote copies
matched their source bytes.
- Tried extensionless, malformed-extension, and
extension/content-mismatched paths; the composer rejected them as image
attachments before goal dispatch rather than creating misleading managed
image files.
- Combined a local image, a large pasted block, and enough raw text to
exceed 4,000 characters. The remote attachment directory contained the
image, paste sidecar, and `goal-objective.md`; all embedded references
used server-host paths and both payloads matched their sources.
- Submitted an image replacement while a goal was active, verified no
image was copied before confirmation, then canceled and confirmed the
attachment count was unchanged.
wangjiecloud pushed a commit to wangjiecloud/codex that referenced this pull request Jun 27, 2026
…ai#8950)

Agent wouldn't "see" attached images and would instead try to use the
view_file tool:
<img width="1516" height="504" alt="image"
src="https://github.com/user-attachments/assets/68a705bb-f962-4fc1-9087-e932a6859b12"
/>

In this PR, we wrap image content items in XML tags with the name of
each image (now just a numbered name like `[Image openai#1]`), so that the
model can understand inline image references (based on name). We also
put the image content items above the user message which the model seems
to prefer (maybe it's more used to definitions being before references).

We also tweak the view_file tool description which seemed to help a bit

Results on a simple eval set of images:

Before
<img width="980" height="310" alt="image"
src="https://github.com/user-attachments/assets/ba838651-2565-4684-a12e-81a36641bf86"
/>

After
<img width="918" height="322" alt="image"
src="https://github.com/user-attachments/assets/10a81951-7ee6-415e-a27e-e7a3fd0aee6f"
/>

```json
[
  {
    "id": "single_describe",
    "prompt": "Describe the attached image in one sentence.",
    "images": ["image_a.png"]
  },
  {
    "id": "single_color",
    "prompt": "What is the dominant color in the image? Answer with a single color word.",
    "images": ["image_b.png"]
  },
  {
    "id": "orientation_check",
    "prompt": "Is the image portrait or landscape? Answer in one sentence.",
    "images": ["image_c.png"]
  },
  {
    "id": "detail_request",
    "prompt": "Look closely at the image and call out any small details you notice.",
    "images": ["image_d.png"]
  },
  {
    "id": "two_images_compare",
    "prompt": "I attached two images. Are they the same or different? Briefly explain.",
    "images": ["image_a.png", "image_b.png"]
  },
  {
    "id": "two_images_captions",
    "prompt": "Provide a short caption for each image (Image 1, Image 2).",
    "images": ["image_c.png", "image_d.png"]
  },
  {
    "id": "multi_image_rank",
    "prompt": "Rank the attached images from most colorful to least colorful.",
    "images": ["image_a.png", "image_b.png", "image_c.png"]
  },
  {
    "id": "multi_image_choice",
    "prompt": "Which image looks more vibrant? Answer with 'Image 1' or 'Image 2'.",
    "images": ["image_b.png", "image_d.png"]
  }
]
```
wangjiecloud pushed a commit to wangjiecloud/codex that referenced this pull request Jun 27, 2026
I've seen this test fail with:

```
 - Mock openai#1.
        	Expected range of matching incoming requests: == 2
        	Number of matched incoming requests: 1
```

This is because we pop the wrong task_complete events and then the test
exits. I think this is because the MCP events are now buffered after
openai#8874.

So:
1. clear the buffer before we do any user message sending
2. additionally listen for task start before task complete
3. use the ID from task start to find the correct task complete event.
wangjiecloud pushed a commit to wangjiecloud/codex that referenced this pull request Jun 27, 2026
Fixes openai#9050

When a draft is stashed with Ctrl+C, we now persist the full draft state
(text elements, local image paths, and pending paste payloads) in local
history. Up/Down recall rehydrates placeholder elements and attachments
so styling remains correct and large pastes still expand on submit.
Persistent (cross‑session) history remains text‑only.

Backtrack prefills now reuse the selected user message’s text elements
and local image paths, so image placeholders/attachments rehydrate when
rolling back.

External editor replacements keep only attachments whose placeholders
remain and then normalize image placeholders to `[Image openai#1]..[Image #N]`
to keep the attachment mapping consistent.

Docs:
- docs/tui-chat-composer.md

Testing:
- just fix -p codex-tui
- cargo test -p codex-tui

Co-authored-by: Eric Traut <etraut@openai.com>
wangjiecloud pushed a commit to wangjiecloud/codex that referenced this pull request Jun 27, 2026
…i#10590)

## Summary
This PR makes app-server-provided image URLs first-class attachments in
TUI, so they survive resume/backtrack/history recall and are resubmitted
correctly.

<img width="715" height="491" alt="Screenshot 2026-02-12 at 8 27 08 PM"
src="https://github.com/user-attachments/assets/226cbd35-8f0c-4e51-a13e-459ef5dd1927"
/>

Can delete the attached image upon backtracking:
<img width="716" height="301" alt="Screenshot 2026-02-12 at 8 27 31 PM"
src="https://github.com/user-attachments/assets/4558d230-f1bd-4eed-a093-8e1ab9c6db27"
/>

In both history and composer, remote images are rendered as normal
`[Image #N]` placeholders, with numbering unified with local images.

## What changed
- Plumb remote image URLs through TUI message state:
  - `UserHistoryCell`
  - `BacktrackSelection`
  - `ChatComposerHistory::HistoryEntry`
  - `ChatWidget::UserMessage`
- Show remote images as placeholder rows inside the composer box (above
textarea), and in history cells.
- Support keyboard selection/deletion for remote image rows in composer
(`Up`/`Down`, `Delete`/`Backspace`).
- Preserve remote-image-only turns in local composer history (Up/Down
recall), including restore after backtrack.
- Ensure submit/queue/backtrack resubmit include remote images in model
input (`UserInput::Image`), and keep request shape stable for
remote-image-only turns.
- Keep image numbering contiguous across remote + local images:
  - remote images occupy `[Image openai#1]..[Image #M]`
  - local images start at `[Image #M+1]`
  - deletion renumbers consistently.
- In protocol conversion, increment shared image index for remote images
too, so mixed remote/local image tags stay in a single sequence.
- Simplify restore logic to trust in-memory attachment order (no
placeholder-number parsing path).
- Backtrack/replay rollback handling now queues trims through
`AppEvent::ApplyThreadRollback` and syncs transcript overlay/deferred
lines after trims, so overlay/transcript state stays consistent.
- Trim trailing blank rendered lines from user history rendering to
avoid oversized blank padding.

## Docs + tests
- Updated: `docs/tui-chat-composer.md` (remote image flow,
selection/deletion, numbering offsets)
- Added/updated tests across `tui/src/chatwidget/tests.rs`,
`tui/src/app.rs`, `tui/src/app_backtrack.rs`, `tui/src/history_cell.rs`,
and `tui/src/bottom_pane/chat_composer.rs`
- Added snapshot coverage for remote image composer states, including
deleting the first of two remote images.

## Validation
- `just fmt`
- `cargo test -p codex-tui`

## Codex author
`codex fork 019c2636-1571-74a1-8471-15a3b1c3f49d`
wangjiecloud pushed a commit to wangjiecloud/codex that referenced this pull request Jun 27, 2026
## Stack

1. [1 of 3] Support long raw TUI goal objectives - openai#27508
2. [2 of 3] Support long pasted text in TUI goals - openai#27509
3. **[3 of 3] Support images in TUI goals** - this PR

## Why

The first two PRs make goal definitions resilient to long text, but
`/goal` still dropped image inputs from the composer. That meant a user
could attach images while defining a goal and the resulting goal
continuation would not have any useful reference to those images.

Goal state still persists only objective text, so image inputs need to
become paths or URLs that the agent can read later.

## What Changed

- Extends TUI `GoalDraft` with local image attachments and remote image
URLs.
- Copies local goal images through the app-server filesystem layer into
the managed goal attachment directory, then rewrites active image
placeholders to file references.
- Appends unplaced local images and remote image URLs to the objective
as referenced image files or URLs.
- Preserves goal image metadata through live `/goal` submission and
queued `/goal` dispatch.

## Verification

- Added goal materialization coverage for local image files and remote
image URLs.
- Added/updated TUI slash-command coverage showing `/goal` drafts
include attached images instead of dropping them.

## Manual Testing

- Attached an image by bracketed-pasting its local path into a live
`/goal` composer. The `[Image openai#1]` placeholder became a server-host
`image-1.png` reference, copied bytes matched exactly, and no attachment
was written under the TUI's local home.
- Deleted an image placeholder before submitting a small goal and
verified no image was copied.
- Attached PNG and JPEG files to the same goal. Placeholder order was
preserved as `image-1.png` and `image-2.jpg`, and both remote copies
matched their source bytes.
- Tried extensionless, malformed-extension, and
extension/content-mismatched paths; the composer rejected them as image
attachments before goal dispatch rather than creating misleading managed
image files.
- Combined a local image, a large pasted block, and enough raw text to
exceed 4,000 characters. The remote attachment directory contained the
image, paste sidecar, and `goal-objective.md`; all embedded references
used server-host paths and both payloads matched their sources.
- Submitted an image replacement while a goal was active, verified no
image was copied before confirmation, then canceled and confirmed the
attachment count was unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants