Skip to content

[Bug]: Antigravity: a shell command over 8,000 characters shows only its last 8,000, under "[Earlier output truncated]" #40695

Closed

Description

@baohappy02

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Open an Antigravity thread.
  2. Ask the agent to write a ~10 KB text file with one shell heredoc, e.g. cat > notes.md <<'EOF' + 10,000 characters + EOF.
  3. Open that command in the thread's work log.

Expected behavior

The command keeps its start (program, flags, target file), where a reader learns what ran. If it must be cut, the cut is marked as a cut command, not as output.

Actual behavior

The command is shown as [Earlier output truncated] followed by its last 8,000 characters. The start (cat > notes.md <<'EOF') is gone, so the entry no longer shows what the command did, and the marker says "output" although the cut text is the command itself. The command ran fine and the file is complete; only T3's copy is cut.

Cause: apps/server/src/provider/acp/AntigravityProtocol.ts. normalizeAntigravityToolCall bounds the command with boundCommandText(nativeCommand.trim()), which keeps the tail (TOOL_TEXT_LIMIT = 8_000, TOOL_TEXT_TRUNCATED). COMMAND_TEXT_FIELDS also lists the input fields CommandLine, command_line, commandLine and command beside the output fields, so sanitizeToolValue tail-cuts the raw input the same way. Keeping the tail fits output; for a command line the head matters most.

Impact

Minor bug or occasional failure

Version or commit

0.1.12-nightly.20261122.5071; same code on main at 721542c

Environment

macOS arm64, T3 Code Nightly desktop app, Antigravity provider

Workaround

None in T3.

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