Skip to content

Support opening-message attachments for CLI and WebUI#4

Closed
ralphite wants to merge 1 commit into
mainfrom
codex/conduct-comprehensive-quality-assurance-testing
Closed

Support opening-message attachments for CLI and WebUI#4
ralphite wants to merge 1 commit into
mainfrom
codex/conduct-comprehensive-quality-assurance-testing

Conversation

@ralphite

Copy link
Copy Markdown
Owner

Motivation

  • Allow users to attach images/files to the opening conversational message so Home/new flows can include screenshots or documents in the first turn.
  • Wire attachments from the CLI and WebUI through the daemon into the hosted run so the first user input is journaled with typed content and attachments, improving UX and enabling multimodal first-turn scenarios.

Description

  • CLI: add repeatable --image and --file flags to agentrunner new and reuse loadImageAttachments/loadFileAttachments to pass attachments in the daemon command (internal/cli/conversation.go).
  • Daemon: extend RunRequest with InitialInput and implement openingInput to convert run commands carrying attachments into a protocol.UserInput that the hosted run receives (internal/daemon/daemon.go).
  • Loop: add Loop.InitialInput and, when present, journal the opening InitialInput via journalInput (attachments are CAS-stored and the InputReceived fact carries refs); fall back to legacy text-only ingestion when absent (internal/agent/loop.go).
  • WebUI server: accept images/files in /api/sessions (new session) and translate them into ar new --image/--file args after validating the upload paths (webui/api.go).
  • WebUI frontend: extend AR.newSession payload to include images/files, allow attachment-only submission in the Home composer (provide a helpful default prompt), and send attachments with the new session request (webui/frontend/src/api.ts, webui/frontend/src/components/Composer.tsx).
  • Tests: add TestNewOpeningAttachmentsAreJournaled to assert agentrunner new --image ... journals an InputReceived with image refs and typed content (internal/cli/conversation_test.go).

Testing

  • Ran the new regression test: go test ./internal/cli -run TestNewOpeningAttachmentsAreJournaled -count=1 — test passed.
  • Ran targeted daemon/agent unit suites used by the change: go test ./internal/daemon and the relevant internal/agent checks for multimodal behavior — these targeted runs completed successfully in this environment.
  • Built the frontend: npm run build in webui/frontend — build succeeded and produced dist/ for embedding.
  • Repository-level gate: ./scripts/check.sh could not complete here because the environment Go toolchain is go1.25.0 while the repo requires Go 1.25.12+ / 1.26.5+ or newer, so the full check-gate was not green in this environment.

Codex Task

@ralphite ralphite closed this Jul 24, 2026
@ralphite
ralphite deleted the codex/conduct-comprehensive-quality-assurance-testing branch July 24, 2026 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant