Skip to content

Enable Claude plugin images and bounded terminal file transport - #28200

Merged
nwparker merged 21 commits into
mainfrom
codex/claude-plugin-terminal-images
Oct 16, 2026
Merged

nwparker merged 21 commits into
mainfrom
codex/claude-plugin-terminal-images

Conversation

@nwparker

@nwparker nwparker commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 21 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2027 $\color{#cf222e}{\Huge{\mathbf{−}}}$​13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2014
Prod 43 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​837 $\color{#cf222e}{\Huge{\mathbf{−}}}$​112 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​725

ELI5

Managed Claude terminals can display plugin images above the prompt, including images loaded from files. Workspace and floating terminals use the same bounded reader. #26031 is merged; this PR now targets main.

What Changed

Orca enables Claude's official image flag when inline images are enabled and the viewer supports it. Explicit and inherited flag overrides stay authoritative. Paired Electron clients advertise support through the existing capability handshake; older and mobile viewers retain alt text.

The existing image addon accepts Kitty t=f through an optional reader callback and reuses its decoder. The callback resolves the terminal's owning runtime and reads only canonical workspace or host temporary paths, bounded to 2 MiB. It checks terminal incarnation and lifetime, refuses hard links and unsafe file types, and cancels stale work. WSL paths stay in the actual PTY distro; remote clients never fall back to their own filesystem.

Floating terminals use the existing floating workspace ID and temporary roots without looking up a project. This fixes the reported selector_not_found without granting the home folder or working directory.

Why

Claude does not automatically recognize Orca's terminal identity, and its Image file source needs transport absent from the parent. The official flag avoids pretending to be another terminal. A bounded callback reuses the existing parser, decoder and host reader. This adds no core or WebGL patch beyond #26031, and the floating correction adds no xterm patch at all.

Linked Issue

Fixes #25109

Completes the Claude file-backed paste case in #23615 when combined with #26031.

Visual Proof

Floating terminal before and after the file-ownership correction (earlier builds):

Floating file image before
Floating file image after
Two floating file images

Earlier original-plugin workspace proof:

Two pasted images
Second image removed

Testing

  • Full pnpm tc, changed-code quality and frozen installation pass on final head 8b3e4f569b69, based on merged main 26278b32ce84.
  • The restack passes 264 focused runtime/file/launch checks. After reducing duplicate RPC mapping, all 120 affected worktree/RPC/startup checks, full typecheck, full production lint and changed-code quality pass. These groups overlap. The 114 installed-addon cases also pass on the unchanged addon.
  • Final fresh build at 8b3e4f569b69: all 10 real-Claude DOM/WebGL smoke cases pass (six public cases and four corrected-private-plugin workspace/floating flows).
  • Fresh hidden macOS real-Claude 2.1.301 public matrix passes 18/18: workspace/floating, bytes/file/clear, DOM/WebGL, three repetitions without retries.
  • Fresh unchanged original-plugin floating paste-two/delete-one/clear passes 6/6. Workspace passes 5/6; its original failed execution remains recorded.
  • Follow-up empty-tile captures show the external plugin asking for nonexistent image-view-2.png while images/2.png exists; Orca correctly returns ENOENT. A plugin SDK regression reproduces without Orca (19 pass / 1 fail). One line checking the converted file exists fixes the SDK suite (20/20) and a separate private-plugin DOM/WebGL run (20/20). This correction is proposed separately, not part of the Orca code or described as an unchanged-plugin pass. The first uninstrumented failure has no file-read capture.
  • Historical live paired-host file rendering passes with client-local reads blocked. Old-viewer controls preserve alt text with flag 0; forcing unsupported file sources shows blank placeholders.
  • Fresh Windows/WSL validation passes all 12 image and nine launch/paste executions, without skips, retries or flaky results. It pins 2beff574; the restack to 2655e660 changed none of the feature files. Final 8b3e4f56 only moves identical viewer-context mapping into the existing builder, removes eight lines and passes the affected RPC contracts.
  • Hosted PR checks have not completed and are not counted as passing.

Tests use isolated signed-out configuration, synthetic files and no model requests. Attachment automation uses bracketed paste of paths rather than changing the user's clipboard.

Review

The final lint correction reuses the existing argument builder for both worktree-create callers instead of repeating viewer-context mapping; the method table retains its 300-line limit. The refresh preserves main's typed runtime hierarchy, desktop/mobile launch split and account environment overlay. Two unrelated inherited CI/lint edits were removed. Both reporters' earlier parent retests pass 30/30 each; a contributor also reports 18/18 public real-Claude cases on the prior child. Those are historical external retests. The earlier native-chat typecheck blocker is fixed by current main.

The parent's later Windows ARM persistence job timed out in the test cleanup hook (orcad-serve-parity.integration.test.ts:34) after the restart test body. That failed job is retained, with no baseline reproduction yet; it is not reported as green. No proven image-related production regression remains from this review. The paired-host foreground-input fixture fails after restart on both the feature and exact-parent control; image restoration after restart is unverified.

Agent skill upstream boundary

  • Not applicable: no upstream skill-installer source is copied or translated.

Notes

Managed Claude mode is covered. Bare-shell Claude still needs CLAUDE_CODE_FORCE_TERMINAL_IMAGES=1. Files above 2 MiB, t=t deletion, t=s shared memory and legacy direct SSH file images remain unsupported. Floating file reads permit host temporary roots only. Cold-remount/restart image restoration is not claimed. The external plugin must supply an existing file path.

Checklist

  • Focused on Claude plugin terminal images
  • User behavior, mechanism and approach explained
  • Before/after screenshots attached
  • Self-reviewed correctness, resource bounds and remote ownership
  • Cross-platform, mobile and older-viewer behavior considered
  • Final hosted verification complete

@benjaminb10

Copy link
Copy Markdown
Contributor

Tested #28200 at f7be4ede on macOS (M series), Claude Code 2.1.294, with a different case from the paste one: an image drawn inline in the transcript (not above the prompt) by a plugin tool, Mechazawa/claude-inline-images show_image, which passes a file source ({ file, format: 'png' }), so it goes through the new t=f path.

Result: the image renders sharp in the transcript, scrolls with the text, no placeholder glyphs. On release 1.4.225 the same call shows empty boxes (with CLAUDE_CODE_FORCE_TERMINAL_IMAGES=1) or only the alt text (without it).

One note for anyone trying this with that plugin: it checks the terminal itself (TERM_PROGRAM ghostty or TERM xterm-kitty) and falls back to half blocks elsewhere, so it needs a one line change to accept Orca (ORCA_IMAGE_PROTOCOL=kitty plus the force flag). That is on the plugin side, not Orca's.

Thanks for the fix, looking forward to it shipping.

@nwparker
nwparker marked this pull request as ready for review October 16, 2026 04:08
Preserve the Claude file-image feature while basing its review on merged main.
@nwparker
nwparker changed the base branch from codex/inline-image-placeholders to main October 16, 2026 04:33
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7f47f7b4-6121-4f99-b915-98e74a152df9
📥 Commits

Reviewing files that changed from the base of the PR and between 26278b3 and 2655e66.

⛔ Files ignored due to path filters: 2
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • src/shared/rpc-contract/rpc-params-catalog.generated.ts is excluded by !**/*.generated.*
📒 Files selected for processing: 62
  • .github/workflows/windows-wsl-e2e.yml
  • config/patches/@[email protected]
  • config/patches/xterm-src/@[email protected]
  • config/scripts/xterm-image-kitty-file-transport.test.mjs
  • src/main/ipc/pty-spawn-env-agent-overlays.test.ts
  • src/main/ipc/pty/host-env/assembly.ts
  • src/main/ipc/pty/host-env/types.ts
  • src/main/ipc/pty/ipc/spawn-env-codex.ts
  • src/main/ipc/pty/provider/local-configure.ts
  • src/main/ipc/pty/runtime/spawn-preflight.ts
  • src/main/pty/wsl-orca-env.test.ts
  • src/main/pty/wsl-orca-env.ts
  • src/main/runtime/agent-terminal-startup-prompt.test.ts
  • src/main/runtime/orca-runtime-create-agent-session.ts
  • src/main/runtime/orca-runtime-create-terminal-desktop.ts
  • src/main/runtime/orca-runtime-read-kitty-file.test.ts
  • src/main/runtime/orca-runtime-read-kitty-file.ts
  • src/main/runtime/rpc/methods/agent-launch-floating-workspace.test.ts
  • src/main/runtime/rpc/methods/agent-launch-surfaces.ts
  • src/main/runtime/rpc/methods/agent-launch-worktree-creation.ts
  • src/main/runtime/rpc/methods/agent-launch.test.ts
  • src/main/runtime/rpc/methods/agent-session.test.ts
  • src/main/runtime/rpc/methods/agent-session.ts
  • src/main/runtime/rpc/methods/session-tabs.ts
  • src/main/runtime/rpc/methods/terminal-manifest-characterization.test.ts
  • src/main/runtime/rpc/methods/terminal/terminal-lifecycle-methods.ts
  • src/main/runtime/rpc/methods/terminal/terminal-query-methods.ts
  • src/main/runtime/rpc/methods/worktree-create-args.ts
  • src/main/runtime/rpc/methods/worktree.ts
  • src/main/runtime/runtime-managed-worktree-create-types.ts
  • src/main/runtime/runtime-terminal-contracts.ts
  • src/main/runtime/session-construction/agent-session/get-agent-session-execution-namespace.ts
  • src/main/runtime/terminal-image-viewer-env.test.ts
  • src/main/runtime/terminal-image-viewer-env.ts
  • src/main/runtime/terminal-image-viewer-rpc.test.ts
  • src/main/runtime/terminal-kitty-file-read.test.ts
  • src/main/runtime/terminal-kitty-file-read.ts
  • src/main/runtime/terminal-kitty-file-wsl-root.test.ts
  • src/main/runtime/terminal/launch/mobile-terminal-create.ts
  • src/main/runtime/terminal/launch/mobile-terminal-renderer-create.ts
  • src/main/runtime/workspaces/workspace-catalog.ts
  • src/main/runtime/workspaces/workspace-creation.ts
  • src/main/runtime/workspaces/workspace-removal-target.ts
  • src/renderer/src/components/terminal-pane/pty-connection/connect-pane-pty.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pty-kitty-file-reader.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pty-kitty-file-reader.ts
  • src/renderer/src/components/terminal-pane/pty-connection/session-reconcile-dispose.ts
  • src/renderer/src/lib/pane-manager/pane-inline-images.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-file-reader.test.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-file-reader.ts
  • src/shared/agent-session-host-authority.ts
  • src/shared/electron-remote-runtime-client-capabilities.ts
  • src/shared/node-bounded-file-reader-window.test.ts
  • src/shared/node-bounded-file-reader.ts
  • src/shared/rpc-contract/terminal-unary-params.ts
  • src/shared/terminal-image-viewer-capability.ts
  • src/shared/terminal-kitty-file.ts
  • tests/e2e/claude-plugin-terminal-images.spec.ts
  • tests/e2e/helpers/claude-plugin-image-fixture.ts
  • tests/e2e/helpers/terminal-kitty-file-image-proof.ts
  • tests/e2e/terminal-inline-images-paired-runtime.spec.ts
  • tests/e2e/terminal-inline-images-windows.spec.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Remove duplicated mapping and keep the RPC method table within its existing line limit.
@nwparker
nwparker merged commit 90849ed into main Oct 16, 2026
32 of 35 checks passed
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.

[Feature] Support kitty graphics Unicode placeholders so Claude Code images render in Orca

2 participants