Skip to content

[Bug]: Antigravity view_file still returns binary MP4 as text after the client_view_file fix #38504

Open

Description

@seankoji

Note

Written by GPT-6.2 Astra on behalf of @seankoji

Before submitting

  • I searched existing issues and did not find a duplicate. The earlier reports are closed. The remaining view_file behavior is described below.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Put a short, playable MP4 in a Linux workspace. For a synthetic test input, this command generates two seconds of video and a tone. The reported runs used other clips.
    ffmpeg -f lavfi -i testsrc2=size=320x240:rate=24 -f lavfi -i sine=frequency=440 -t 2 -c:v libx264 -pix_fmt yuv420p -c:a aac synthetic.mp4
  2. Start an Antigravity delegate from T3 Code with Argon-high or Hydrogen-high. Ask the delegate to read the local MP4 using client_view_file. Record whether it returns a text-file error.
  3. Ask the same delegate to read the same file using view_file. Inspect the tool result itself. Browser playback, shell decoding, and frame extraction do not exercise this step.

Expected behavior

If view_file cannot deliver an MP4 as media, it should return a short unsupported-type error and leave the turn usable. A clear rejection is sufficient to resolve this bug. Synchronized audio/video transport is a separate feature request.

Actual behavior

On 18 November 2026, Argon-high and Hydrogen-high delegates read the same 6,215,201-byte MP4. In both runs, client_view_file rejected the binary input as designed. The separate view_file tool returned MP4 container bytes interpreted as UTF-8 text. The opening bytes included the recognizable ftypisom marker. Neither delegate received usable audio or video from that result.

With a larger H.264/AAC MP4 (26,690,217 bytes), the turn reported the model-output error below and cleared the view_file output. Browser playback was verified independently. The two observations do not establish a size threshold or identify which component produced the text.

#36955 was closed as a duplicate of #24969, which was closed in favor of merged PR #25292. That PR added strict UTF-8 validation to T3's text reader used by client_view_file. The rejection observed here matches that change. The remaining failure occurs when a delegate calls view_file on the very same input. #17066 concerns native MP4 attachments. These runs exercised on-disk file reads only.

Impact

Major degradation or frequent failure. Both delegates returned unusable text for a valid MP4, and the larger-file turn lost its tool result.

Version or commit

The reporting host lists T3 Code 0.1.11-nightly.20261118.4864 as installed. The local agy --version reports 1.5.10. The exact server build and Antigravity executable used by the affected delegates were not captured.

Environment

Linux, T3 Code delegated Antigravity sessions, Argon-high and Hydrogen-high. Composer uploads and direct Antigravity CLI media reads were untested.

Logs or stack traces

model output must contain either output text or tool calls

Workaround

Opening the MP4 in a browser allowed a human to check playback. No workaround was verified for the delegate's view_file call.

Activity

  1. juliusmarminge commented on Nov 19, 2026

    @juliusmarminge
    Member

    I tried to reproduce this on the current build and could not.

    Commit 66235c7 (origin/main). Dev server started with T3CODE_DEV_SEED=0 and GOOGLE_GEMINI_BASE_URL pointing at the hub, on a fresh database. Antigravity provider instance enabled with authMethod gemini-api-key and a dummy key; agy 1.5.12 on PATH. Generated the reporter's synthetic MP4 (ffmpeg testsrc2 + sine, 2 s, 89 KB) and a 6,224,831-byte 720p H.264/AAC MP4 (close to the reporter's 6,215,201 bytes) in a git workspace, added it as a project, and ran t3 thread start --provider antigravity --model <m> --wait asking the agent to read the file with view_file and quote the tool result. Results: gemini-3.8-flash with the small file returned the text header 'Showing binary file of type video/mp4' plus the video as media; gemini-4-hydrogen with effort=high and the small file returned the same header plus video frames (the agent called the tool read_file); gemini-4-hydrogen with the 6.2 MB file returned the header plus video frames from 00:00 to 00:19. No run returned container bytes as UTF-8 text, and none hit 'model output must contain either output text or tool calls'. T3's provider event logs for these turns contain no fs/read_text_file request: view_file runs entirely inside agy and never reaches T3. client_view_file was not re-tested; its rejection is the intended behaviour from #25292. The reporter's 26 MB file was not tried.

    Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.

  2. juliusmarminge commented on Nov 19, 2026

    @juliusmarminge
    Member

    Reopening. The check above ran in a different setup from the report (an API key instead of a Google account, and Antigravity 1.5.12), so not seeing the bug there does not show it is gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions