Skip to content

[3830 by Claude Opus 5.5] # Antigravity task runs show only the final summary: no execution events, no live activity - #3840

Merged
integry merged 4 commits into
mainfrom
3830/claude-opus-5-5-antigravity-task-runs-sho-20261127-1440-1so
Nov 27, 2026
Merged

integry merged 4 commits into
mainfrom
3830/claude-opus-5-5-antigravity-task-runs-sho-20261127-1440-1so

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3830

Branch: 3830/claude-opus-5-5-antigravity-task-runs-sho-20261127-1440-1so
Commits: ✅ Changes committed (8921289)


AI Processing Completed

Execution Details:

Summary:
I've implemented all five changes from issue #3830, plus the tests the issue lists. A live agy run still needs your maintainer check, because there's no agy login here.

Test status: a run of 86 Antigravity-related test files gave 1422 passes and 2 failures. Both failures were caused by my change and are now fixed:

  • Read-only directory: in this container /tmp/git-processor is read-only, and creating the per-run transcript directory there threw, which failed the task launch (test/analysisGitAccess.test.ts). Now, if the directory can't be created, the worker logs a warning and the run goes ahead without a transcript.
  • Security check: test/securityInputHardening.test.ts checks that AntigravityAgent.ts uses randomBytes(8). That code moved to a new file, so the test now checks the new file, which still uses randomBytes(8).

The re-run of those files and the new tests passed (88 of 88). Lint and typecheck are clean for core and api.

What changed

  1. Transcript export: each task run gets its own private transcript directory, mounted read-write at /tmp/propr-antigravity-transcript. That path is outside every read-only mount, and /tmp/git-processor stays read-only.
    • The new helpers are in antigravityTranscriptPaths.ts.
    • If the host sees the transcript root at a different path, set the new PROPR_ANTIGRAVITY_TRANSCRIPT_HOST_ROOT. The default root needs nothing, since the launcher mounts /tmp/git-processor at the same path on the host and in the worker.
    • The entrypoint now warns when there's no transcript to export. It also deletes anything already sitting at the destination before copying, rather than writing through it.
    • The worker warns when a transcript was expected but is missing, and only reads it if it's a regular file.
  2. Stream output for tasks: task runs now use --output-format stream-json. The stdin prompt and --print-timeout are unchanged, and the final summary comes from the result response. Analysis runs keep plain text output.
  3. Full trace: the analysis filter no longer applies to task logs. The new antigravityConversationLog.ts turns transcript steps into Claude-shaped events:
    • planner responses become text plus thinking.
    • tool steps become tool_use/tool_result pairs, with the command or target parsed out of the content, and is_error set when the step failed.
    • ERROR_MESSAGE becomes an error, and USER_INPUT becomes a user message.
    • Without a transcript, the streamed steps are used at step granularity.
    • Two parser changes: SYSTEM is now accepted as a transcript source, and the transcript summary only comes from planner responses, not command output.
  4. Live view: the new redisOutputParserAntigravity.ts handles the event: envelope. Response text becomes one thought per step, and other steps become tool activity. The final result adds its response only if it differs from what was already streamed, and token usage counts the larger of the step sum and the result total. Goals use this same path, so they get live tool activity too. The old message handling is unchanged.
  5. Cost attribution: the cost export matches an execution to its log row by session. Antigravity runs used to record no session ('unknown' on the execution row, null on the log row), so nothing matched and the agent and execution type showed as null. The stream's conversation ID is now the session ID, and a run that reports none gets a generated antigravity-run-… ID.

New tests

  • The fixture is saved at test/fixtures/antigravity/agy-1.5-transcript-tools.jsonl.
  • test/antigravityTaskTranscript.test.ts covers:
    • the read-write mount, and that it isn't under a read-only mount.
    • the result processing: tool pairs, is_error on the failed step, summary, token usage, session ID.
    • an entrypoint smoke test.
  • Smoke test caveat: this container has neither Docker nor root, so the smoke test runs the real entrypoint against a simulated container filesystem built from the real mount arguments. Stubbed id, su-exec and agy stand in for root and the CLI. With main's mount arguments swapped back in, the test fails because the host transcript is missing.
  • test/llmMetricsRecording.test.ts checks that the persisted log details hold the tool calls and the error step, without double-counting tokens.
  • test/redisOutputParser.test.ts checks thoughts, tool steps, result handling and token usage from stream-json.
  • All existing analysis and summary tests pass unchanged.

There's nothing visual to preview, so I didn't create one.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (8 files)
    • packages/api/services/redisOutputParser.ts (+10/−0)
    • packages/api/services/redisOutputParserAntigravity.ts (added, +167/−0)
    • packages/core/src/agents/impl/AntigravityAgent.ts (+32/−29)
    • packages/core/src/agents/impl/utils/antigravityConversationLog.ts (added, +144/−0)
    • packages/core/src/agents/impl/utils/antigravityDockerArgsBuilder.ts (+3/−1)
    • packages/core/src/agents/impl/utils/antigravityOutputParser.ts (+7/−6)
    • packages/core/src/agents/impl/utils/antigravityTranscriptPaths.ts (added, +83/−0)
    • scripts/antigravity-entrypoint.sh (+12/−2)
  • Low risk (5 files)
    • test/antigravityTaskTranscript.test.ts (added, +227/−0)
    • test/fixtures/antigravity/agy-1.5-transcript-tools.jsonl (added, +11/−0)
    • test/llmMetricsRecording.test.ts (+25/−0)
    • test/redisOutputParser.test.ts (+46/−0)
    • test/securityInputHardening.test.ts (+6/−1)

Diff size: 13 files changed, +773/−39 lines

View task for the run's logs and conversation.


This PR was created automatically by ProPR after processing issue #3830.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!

I've implemented all five changes from issue #3830, plus the tests the issue lists. A live `agy` run still needs your maintainer check, because there's no agy login here.

Test status: a run of 86 Antigravity-related test files gave 1422 passes and 2 failures. Both failures were caused by my change and are now fixed:
- Read-only directory: in this container `/tmp/git-processor` is read-only, and creating the per-run transcript directory there threw, which failed the task launch (`test/analysisGitAccess.test.ts`). Now, if the directory can't be created, the worker logs a warning and the run goes ahead without a transcript.
- Security check: `test/securityInputHardening.test.ts` checks that `AntigravityAgent.ts` uses `randomBytes(8)`. That code moved to a new file, so the test now checks the new file, which still uses `randomBytes(8)`.

The re-run of those files and the new tests passed (88 of 88). Lint and typecheck are clean for core and api.

What changed
1. Transcript export: each task run gets its own private transcript directory, mounted read-write at `/tmp/propr-antigravity-transcript`. That path is outside every read-only mount, and `/tmp/git-processor` stays read-only.
   - The new helpers are in `antigravityTranscriptPaths.ts`.
   - If the host sees the transcript root at a different path, set the new `PROPR_ANTIGRAVITY_TRANSCRIPT_HOST_ROOT`. The default root needs nothing, since the launcher mounts `/tmp/git-processor` at the same path on the host and in the worker.
   - The entrypoint now warns when there's no transcript to export. It also deletes anything already sitting at the destination before copying, rather than writing through it.
   - The worker warns when a transcript was expected but is missing, and only reads it if it's a regular file.
2. Stream output for tasks: task runs now use `--output-format stream-json`. The stdin prompt and `--print-timeout` are unchanged, and the final summary comes from the `result` response. Analysis runs keep plain text output.
3. Full trace: the analysis filter no longer applies to task logs. The new `antigravityConversationLog.ts` turns transcript steps into Claude-shaped events:
   - planner responses become text plus thinking.
   - tool steps become `tool_use`/`tool_result` pairs, with the command or target parsed out of the content, and `is_error` set when the step failed.
   - `ERROR_MESSAGE` becomes an error, and `USER_INPUT` becomes a user message.
   - Without a transcript, the streamed steps are used at step granularity.
   - Two parser changes: `SYSTEM` is now accepted as a transcript source, and the transcript summary only comes from planner responses, not command output.
4. Live view: the new `redisOutputParserAntigravity.ts` handles the `event:` envelope. Response text becomes one thought per step, and other steps become tool activity. The final result adds its response only if it differs from what was already streamed, and token usage counts the larger of the step sum and the result total. Goals use this same path, so they get live tool activity too. The old message handling is unchanged.
5. Cost attribution: the cost export matches an execution to its log row by session. Antigravity runs used to record no session (`'unknown'` on the execution row, null on the log row), so nothing matched and the agent and execution type showed as null. The stream's conversation ID is now the session ID, and a run that reports none gets a generated `antigravity-run-…` ID.

New tests
- The fixture is saved at `test/fixtures/antigravity/agy-1.5-transcript-tools.jsonl`.
- `test/antigravityTaskTranscript.test.ts` covers:
  - the read-write mount, and that it isn't under a read-only mount.
  - the result processing: tool pairs, `is_error` on the failed step, summary, token usage, session ID.
  - an entrypoint smoke test.
- Smoke test caveat: this container has neither Docker nor root, so the smoke test runs the real entrypoint against a simulated container filesystem built from the real mount arguments. Stubbed `id`, `su-exec` and `agy` stand in for root and the CLI. With main's mount arguments swapped back in, the test fails because the host transcript is missing.
- `test/llmMetricsRecording.test.ts` checks that the persisted log details hold the tool calls and the error step, without double-counting tokens.
- `test/redisOutputParser.test.ts` checks thoughts, tool steps, result handling and token usage from stream-json.
- All existing analysis and summary tests pass unchanged.

There's nothing visual to preview, so I didn't create one.

ProPR-Agent: claude/claude-opus-5-5
@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=8
Triggered automatically by the requested execution settings.

@propr-dev propr-dev Bot added the ultrafix label Nov 27, 2026
@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 8)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

This PR addresses transcript export, live Antigravity activity, and session-based cost attribution. It needs a localized correctness fix before merge.

✅ Writable transcript export — The dedicated bind mount places exported transcripts outside the read-only shared git mount.

✅ Consistent session identity — The generated fallback session ID is shared by the returned execution result and implementation log.

✅ Persistence coverage — Added tests verify tool inputs, result pairing, error persistence, and preservation of run-level token totals.

This review is static; no commands or tests were run. The issue description is explicitly truncated, so assessment uses its visible requirements. Current checks have no failures and six pending results.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Preserve unfinished tool states

  • Category: correctness

  • Required behavior: Persisted execution events must distinguish completed tool calls from unfinished activity; interruption must not manufacture successful tool results.

  • Evidence: packages/core/src/agents/impl/utils/antigravityConversationLog.ts, streamStepToClaudeEvents and transcriptStepToClaudeEvents

    1. A task emits a RUN_COMMAND step in RUNNING state, then times out before emitting a terminal update. If transcript export is unavailable, resolveSessionOutput uses the captured stream.
    2. buildAntigravityConversationLog selects that running update as the latest tool update. streamStepToClaudeEvents unconditionally creates both a tool call and a tool result, marking the result successful because the state is not ERROR.
    3. Metrics persistence stores this fabricated result with is_error: false, and the completed-task view renders a result for a command that never reported completion.
    4. The transcript conversion has the same defect: the added fixture contains a RUNNING command, and the new tests explicitly expect a non-error result for it.

    static trace: Both conversion functions emit results unconditionally. Run-level timeout handling does not alter these per-tool records. The new live projector correctly waits for terminal states, but that protection is absent from persistence, so live and completed views disagree.

  • Minimum fix: Emit tool-use records for unfinished steps, but emit tool results only when completion is established. Apply this to both transcript and stream conversion, preserve unsuccessful terminal states, and update the running-step test expectation.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Test completed-view fallback rendering

Add a consumer-level test that passes stream-derived conversation logs through metrics persistence and completed-task rendering when transcript export fails. Include a terminal response that adds text beyond the streamed narration. The builder stores that response in a result message, while the supplied rendering excerpt treats assistant messages specially; an integration test would clarify this boundary. This is optional coverage because the supplied excerpt does not establish the complete result-row routing behavior.

Score

The implementation substantially addresses the visible objective and adds focused coverage, but persisted tool results currently misrepresent interrupted activity. The required correction is localized.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 3s
  • Tokens: 66,485 (65,107 in / 1,378 out)
  • Cost: $0.59

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 S1

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit b1846ea

Addressed 1 AI review comment (IDs: 7221827387)

Addressed finding F1

Summary of Changes

I fixed F1. An Antigravity tool step that never finished now gets saved as a tool call with no result, so a run that times out no longer records a successful result for a command that never completed.

What changed (packages/core/src/agents/impl/utils/antigravityConversationLog.ts)

  • I added the list of finishing states the live view already uses: DONE, ERROR, FAILED, CANCELED, CANCELLED.
  • Streamed steps: if a step's latest update isn't one of those states (for example still RUNNING), only the tool call is kept. Finished steps get a result, marked as an error unless the state is DONE. Before, only ERROR was marked as an error, so FAILED and cancelled steps were saved as successes.
  • Transcript steps: the same rule applies. One exception: a step whose text says Encountered error in step execution: gets an error result, even if its status isn't a finishing one. A transcript step with no status at all is treated as unfinished.
  • I checked the other places that build tool results. The live view already waited for a finishing state, and the older message format carries an explicit success/error status, so neither needed a change.

Tests

  • test/antigravityTaskTranscript.test.ts and test/llmMetricsRecording.test.ts now expect the RUNNING step 23 in the fixture to keep its tool call with no result. The remaining error flags are [false, false, true, false].
  • Two new tests cover:
    • Streamed steps: a step that runs then finishes, a step stuck in RUNNING, a cancelled step, and a FAILED step.
    • Transcript steps: RUNNING, no status, a RUNNING step that reported an error, and CANCELLED.

The two test files pass (17 of 17). I also put the old version of the file back and re-ran them: both of the previously changed tests fail, so they do catch the bug. Lint and the core typecheck are clean.

I made no preview images because this only changes the saved log records, not the UI code.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • packages/core/src/agents/impl/utils/antigravityConversationLog.ts (+14/−4)
  • Low risk (2 files)
    • test/antigravityTaskTranscript.test.ts (+38/−4)
    • test/llmMetricsRecording.test.ts (+4/−2)

Diff size: 3 files changed, +56/−10 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 5m 7s
  • Tokens: 853,180 (846,621 in / 6,559 out)
  • Cost: $0.58

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

I fixed F1. An Antigravity tool step that never finished now gets saved as a tool call with no result, so a run that times out no longer records a successful result for a command that never completed.

**What changed** (`packages/core/src/agents/impl/utils/antigravityConversationLog.ts`)
- I added the list of finishing states the live view already uses: `DONE`, `ERROR`, `FAILED`, `CANCELED`, `CANCELLED`.
- **Streamed steps:** if a step's latest update isn't one of those states (for example still `RUNNING`), only the tool call is kept. Finished steps get a result, marked as an error unless the state is `DONE`. Before, only `ERROR` was marked as an error, so `FAILED` and cancelled steps were saved as successes.
- **Transcript steps:** the same rule applies. One exception: a step whose text says `Encountered error in step execution:` gets an error result, even if its status isn't a finishing one. A transcript step with no status at all is treated as unfinished.
- I checked the other places that build tool results. The live view already waited for a finishing state, and the older message format carries an explicit success/error status, so neither needed a change.

**Tests**
- `test/antigravityTaskTranscript.test.ts` and `test/llmMetricsRecording.test.ts` now expect the `RUNNING` step 23 in the fixture to keep its tool call with no result. The remaining error flags are `[false, false, true, false]`.
- Two new tests cover:
  - **Streamed steps:** a step that runs then finishes, a step stuck in `RUNNING`, a cancelled step, and a `FAILED` step.
  - **Transcript steps:** `RUNNING`, no status, a `RUNNING` step that reported an error, and `CANCELLED`.

The two test files pass (17 of 17). I also put the old version of the file back and re-ran them: both of the previously changed tests fail, so they do catch the bug. Lint and the core typecheck are clean.

I made no preview images because this only changes the saved log records, not the UI code.

PR: #3840
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5

ProPR-Agent: claude/claude-opus-5-5
@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@integry

integry commented Nov 27, 2026

Copy link
Copy Markdown
Owner

I tested 8921289 with a real agy run in the built image (OAuth login copy; same subtract task as the main baseline). It's a big improvement over main:

main this PR
persisted events 0 17
session ID none bac86fde-…
token usage 52 in / 202 out (prompt estimate) 18,518 in / 29,854 cache read / 994 out / 491 reasoning

Two problems left, both in how tool steps are named and shown:

1. Persisted tool events have no name and no input. All 5 tool_use events are name: "GENERIC" with input: {}, although the steps were ls -la, two file writes, node --test and a git command. Only the tool_result text shows what happened. A command that exited with code 128 has is_error: false.

2. The live parser takes the step type as the tool name. Feeding the real stream below to parseRedisOutput gives:

tool_use "user_input"  → tool_result ""
tool_use "tool"        → tool_result ""   (×3)
thought  (final response only)
usage    {"input_tokens":14026,"output_tokens":1099,"cache_read_input_tokens":14152}   ← correct

So the user prompt shows up as a tool call, every tool is named tool, the results are empty, and cat missing.txt (exit code 1) isn't flagged as an error.

The stream-json records already carry everything needed (real agy 1.5.15 output from this image, trimmed):

  • step_update.step_type is one of user_input, agent_response or tool.
  • For tools: tool_name (e.g. run_command, write_file), tool_info.parameters (e.g. {"CommandLine":"cat missing.txt"}, {"Path":"…/notes.txt"}) and, on state: "DONE", tool_info.output.
  • agent_response steps carry per-step usage; result carries totals and the final response.

Please:

  • Build persisted conversationLog tool events from the stream-json step_update records. Fall back to the transcript only when the stream has no tool steps.
    • tool_use: name = tool_name, input = tool_info.parameters.
    • tool_result: the tool_info.output text.
    • is_error: true when state is ERROR, or the output contains Command exited with code N with N ≠ 0.
  • Live parser:
    • Only step_type: "tool" becomes tool_use/tool_result, keyed by step_index: ACTIVE → tool_use, DONE/ERROR → tool_result with the output and the same error rule.
    • user_input is not a tool.
    • agent_response steps become assistant narration when text deltas exist; otherwise only the final result.response.
  • Add this stream as a fixture (test/fixtures/antigravity/agy-1.5-stream-tools.jsonl), with tests for both the persisted and the live paths: tool names, parameters, outputs, the exit-code-1 error, and that user_input is not a tool.
{"event":"init","conversation_id":"32c6d960-6ab9-4122-ad6d-30730d00518e","init":{"model":"gemini-3.8-flash-medium","cwd":"/home/node/workspace","tools":["ask_custom_permission","ask_permission","ask_question","browser_click_element","browser_drag_pixel_to_pixel","…"],"permission_mode":"always-proceed"}}
{"event":"step_update","step_update":{"conversation_id":"32c6d960-6ab9-4122-ad6d-30730d00518e","step_index":0,"state":"DONE","step_type":"user_input"}}
{"event":"step_update","step_update":{"conversation_id":"32c6d960-6ab9-4122-ad6d-30730d00518e","step_index":1,"state":"DONE","step_type":"agent_response","duration_seconds":6.841932236,"usage":{"input_tokens":8747,"output_tokens":488,"thinking_tokens":450,"cache_read_tokens":0,"total_tokens":9235}}}
{"event":"step_update","step_update":{"conversation_id":"32c6d960-6ab9-4122-ad6d-30730d00518e","step_index":2,"state":"ACTIVE","step_type":"tool","tool_name":"run_command","tool_info":{"name":"run_command","parameters":{"CommandLine":"ls -la"}}}}
{"event":"step_update","step_update":{"conversation_id":"32c6d960-6ab9-4122-ad6d-30730d00518e","step_index":2,"state":"DONE","step_type":"tool","tool_name":"run_command","duration_seconds":0.011933021,"tool_info":{"name":"run_command","parameters":{"CommandLine":"ls -la"},"output":"Created At: 2026-11-27T15:21:05Z\nCompleted At: 2026-11-27T15:21:05Z\nCommand exited with code 0.\n\nCommand output:\ntotal 16\r\ndrwxr-xr-x 1 node users  70 Nov 27 15:20 .\r\ndrwxr-xr-x 1 node node    2 Nov 27 15:20 ..\r\n-rw-r--r-- 1 node users 122 Nov 27 09:57 .git\r\n-rw-r--r-- 1 node users  66 Nov 27 15:20 math.js\r\n-rw-r--r-- 1 node users 170 Nov 27 15:20 math.test.js\r\n-rw-r--r-- 1 node users  67 Nov 27 09:57 package.json\r\n"}}}
{"event":"step_update","step_update":{"conversation_id":"32c6d960-6ab9-4122-ad6d-30730d00518e","step_index":3,"state":"DONE","step_type":"agent_response","duration_seconds":4.8304342590000005,"usage":{"input_tokens":2768,"output_tokens":322,"thinking_tokens":250,"cache_read_tokens":6711,"total_tokens":3090}}}
{"event":"step_update","step_update":{"conversation_id":"32c6d960-6ab9-4122-ad6d-30730d00518e","step_index":4,"state":"ACTIVE","step_type":"tool","tool_name":"write_file","tool_info":{"name":"write_file","parameters":{"Path":"/home/node/workspace/notes.txt"}}}}
{"event":"step_update","step_update":{"conversation_id":"32c6d960-6ab9-4122-ad6d-30730d00518e","step_index":4,"state":"DONE","step_type":"tool","tool_name":"write_file","duration_seconds":0.780081897,"tool_info":{"name":"write_file","parameters":{"Path":"/home/node/workspace/notes.txt"}}}}
{"event":"step_update","step_update":{"conversation_id":"32c6d960-6ab9-4122-ad6d-30730d00518e","step_index":5,"state":"ACTIVE","step_type":"tool","tool_name":"run_command","tool_info":{"name":"run_command","parameters":{"CommandLine":"cat missing.txt"}}}}
{"event":"step_update","step_update":{"conversation_id":"32c6d960-6ab9-4122-ad6d-30730d00518e","step_index":5,"state":"DONE","step_type":"tool","tool_name":"run_command","duration_seconds":0.039406023,"tool_info":{"name":"run_command","parameters":{"CommandLine":"cat missing.txt"},"output":"Created At: 2026-11-27T15:21:10Z\nCompleted At: 2026-11-27T15:21:10Z\nCommand exited with code 1.\n\nCommand output:\ncat: missing.txt: No such file or directory\r\n"}}}
{"event":"step_update","step_update":{"conversation_id":"32c6d960-6ab9-4122-ad6d-30730d00518e","step_index":6,"state":"ACTIVE","step_type":"agent_response","text_delta":"1. **Listed workspace files**:\n   ```\n   .git\n  "}}
{"event":"step_update","step_update":{"conversation_id":"32c6d960-6ab9-4122-ad6d-30730d00518e","step_index":6,"state":"DONE","step_type":"agent_response","text_delta":" math.js\n   math.test.js\n   package.json\n   ```\n\n2. **Created file**:\n   Created [notes.txt](file:///home/node/workspace/notes.txt) containing `hi`.\n\n3. **Ran `cat missing.txt`**:\n   ```\n   cat: missing.txt: No such file or directory\n   ```\n   *(Command exited with return code 1 as `missing.txt` does not exist)*\n","duration_seconds":5.155683724,"usage":{"input_tokens":2511,"output_tokens":289,"thinking_tokens":173,"cache_read_tokens":7441,"total_tokens":2800}}}
{"event":"result","result":{"conversation_id":"32c6d960-6ab9-4122-ad6d-30730d00518e","status":"SUCCESS","response":"1. **Listed workspace files**:\n   ```\n   .git\n   math.js\n   math.test.js\n   package.json\n   ```\n\n2. **Created file**:\n   Created [notes.txt](file:///home/node/workspace/notes.txt) containing `hi`.\n\n3.","duration_seconds":16.920569691,"num_turns":1,"usage":{"input_tokens":14026,"output_tokens":1099,"thinking_tokens":873,"cache_read_tokens":14152,"total_tokens":15125}}}

@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 64b2728

Summary of Changes

Both problems are fixed. Tool steps are now built from the stream-json step_update records in the saved log and in the live view. Your stream fixture now gives run_command {CommandLine:"ls -la"}, write_file {Path:…/notes.txt} and run_command {CommandLine:"cat missing.txt"}. Each has its real output, and the cat step is flagged as an error. I haven't repeated your real agy run with this change; the tests below use your fixture.

Saved log (antigravityConversationLog.ts, AntigravityAgent.ts)

  • When the stdout stream has any step_type: "tool" steps, the saved log is built from the stream. Otherwise it falls back to the transcript as before. That stops the GENERIC / {} tool events.
  • tool_use takes its name from tool_name and its input from tool_info.parameters. tool_result holds the tool_info.output text.
  • A step keeps its name and parameters even if a later update for it leaves them out.
  • is_error is true when the state isn't DONE, or when the output says Command exited with code N with N ≠ 0. The transcript fallback uses the same rule, so your exit-code-128 case is now an error there too.
  • user_input and any other non-tool, non-response steps are skipped.

Live parser (redisOutputParserAntigravity.ts)

  • Only tool steps, keyed by step index, become tool events: the first update gives the tool_use with name and parameters, and DONE/ERROR gives the tool_result with the output and the same error rule.
  • user_input no longer appears as a tool.
  • agent_response text becomes the assistant's narration. The final result.response is shown only when no narration streamed for that conversation.

Changes beyond your list:

  • Final response not repeated in the saved log either. I applied the same narration rule there. Your fixture's result.response is cut off at "3.", so it would otherwise have been saved as a second, partial copy of the answer.
  • Breaking change for the old step format. Steps in the older format, where the step type was the tool's name (e.g. RUN_COMMAND), no longer become tool events in either path. Two existing tests used that format, and I rewrote them to the real tool shape.

Tests

  • I added your stream as test/fixtures/antigravity/agy-1.5-stream-tools.jsonl, unchanged.
  • The saved-log test runs the fixture through processExecutionResult with the GENERIC transcript also present. It checks tool names, parameters, outputs, that only the exit-code-1 step is an error, that there are no GENERIC or user_input tools, and that the narration appears once.
  • Smaller tests cover the exit-code-128 transcript case, the live path against the fixture (including token totals), and showing result.response when nothing streamed.

Results

  • Passing: the two changed test files (30/0), all root antigravity* tests (60/0), llmMetricsRecording (11/0), core antigravityConfig (54/0), and the 6 mcpAgentActivity tests (that process doesn't exit afterwards, a known hang in this package). Type checks and lint for core and api are clean.
  • When I first ran everything in one parallel batch, 4 tests failed. That was the setup, not the code: the entrypoint tests clashed when run in parallel, and llmMetricsRecording needs --experimental-test-module-mocks. Run alone, they all pass.

No preview was captured: it would need the API with Redis and a headless browser, which this container doesn't have. The manifest notes what to install.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (4 files)
    • packages/api/services/redisOutputParserAntigravity.ts (+28/−9)
    • packages/core/src/agents/impl/AntigravityAgent.ts (+5/−2)
    • packages/core/src/agents/impl/utils/antigravityConversationLog.ts (+63/−16)
    • packages/core/src/agents/impl/utils/antigravityOutputParser.ts (+3/−0)
  • Low risk (3 files)
    • test/antigravityTaskTranscript.test.ts (+51/−4)
    • test/fixtures/antigravity/agy-1.5-stream-tools.jsonl (added, +13/−0)
    • test/redisOutputParser.test.ts (+40/−7)

Diff size: 7 files changed, +203/−38 lines

Visual preview

Suggested agent tools

  • Redis server + Playwright Chromium: A preview of the task page's live Antigravity tool activity needs the API with a reachable Redis (to replay the agy stream-json fixture into a task's live output) and a headless browser to capture the rendered timeline; neither is available in this agent container.

🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @integry
  • Time: 18m 16s
  • Tokens: 3,447,966 (3,446,769 in / 1,197 out)
  • Cost: $1.19
  • Subscription usage: Weekly +1%

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 7221966298✓

Both problems are fixed. Tool steps are now built from the stream-json `step_update` records in the saved log and in the live view. Your stream fixture now gives `run_command {CommandLine:"ls -la"}`, `write_file {Path:…/notes.txt}` and `run_command {CommandLine:"cat missing.txt"}`. Each has its real output, and the `cat` step is flagged as an error. I haven't repeated your real `agy` run with this change; the tests below use your fixture.

**Saved log** (`antigravityConversationLog.ts`, `AntigravityAgent.ts`)
- When the stdout stream has any `step_type: "tool"` steps, the saved log is built from the stream. Otherwise it falls back to the transcript as before. That stops the `GENERIC` / `{}` tool events.
- `tool_use` takes its `name` from `tool_name` and its `input` from `tool_info.parameters`. `tool_result` holds the `tool_info.output` text.
- A step keeps its name and parameters even if a later update for it leaves them out.
- `is_error` is true when the state isn't `DONE`, or when the output says `Command exited with code N` with N ≠ 0. The transcript fallback uses the same rule, so your exit-code-128 case is now an error there too.
- `user_input` and any other non-tool, non-response steps are skipped.

**Live parser** (`redisOutputParserAntigravity.ts`)
- Only `tool` steps, keyed by step index, become tool events: the first update gives the `tool_use` with name and parameters, and `DONE`/`ERROR` gives the `tool_result` with the output and the same error rule.
- `user_input` no longer appears as a tool.
- `agent_response` text becomes the assistant's narration. The final `result.response` is shown only when no narration streamed for that conversation.

**Changes beyond your list:**
- **Final response not repeated in the saved log either.** I applied the same narration rule there. Your fixture's `result.response` is cut off at "3.", so it would otherwise have been saved as a second, partial copy of the answer.
- **Breaking change for the old step format.** Steps in the older format, where the step type was the tool's name (e.g. `RUN_COMMAND`), no longer become tool events in either path. Two existing tests used that format, and I rewrote them to the real `tool` shape.

**Tests**
- I added your stream as `test/fixtures/antigravity/agy-1.5-stream-tools.jsonl`, unchanged.
- The saved-log test runs the fixture through `processExecutionResult` with the GENERIC transcript also present. It checks tool names, parameters, outputs, that only the exit-code-1 step is an error, that there are no `GENERIC` or `user_input` tools, and that the narration appears once.
- Smaller tests cover the exit-code-128 transcript case, the live path against the fixture (including token totals), and showing `result.response` when nothing streamed.

**Results**
- Passing: the two changed test files (30/0), all root `antigravity*` tests (60/0), `llmMetricsRecording` (11/0), core `antigravityConfig` (54/0), and the 6 `mcpAgentActivity` tests (that process doesn't exit afterwards, a known hang in this package). Type checks and lint for core and api are clean.
- When I first ran everything in one parallel batch, 4 tests failed. That was the setup, not the code: the entrypoint tests clashed when run in parallel, and `llmMetricsRecording` needs `--experimental-test-module-mocks`. Run alone, they all pass.

No preview was captured: it would need the API with Redis and a headless browser, which this container doesn't have. The manifest notes what to install.

PR: #3840
Comment by: @integry (ID: 7221966298)
Model: Claude Opus 5.5

ProPR-Agent: claude/claude-opus-5-5
@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds writable transcript export, structured live activity, persisted tool exchanges, and session-based cost attribution. It needs a localized correctness fix before merging.

✅ Transcript export isolation — Each run gets a separate writable mount outside the read-only shared git tree, with cleanup and explicit export warnings.

✅ Tool result fidelity — Persisted tool updates retain parameters and output, preserve unfinished calls without fabricated results, and recognize nonzero command exits.

This is a static review of the supplied code; no commands were run. The issue description is explicitly truncated, so requirements beyond its visible text could not be assessed. Current checks show no failures and three pending checks.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F2: 🔴 Preserve final responses after intermediate narration

  • Category: correctness

  • Required behavior: Structured execution activity must preserve the final answer when it differs from earlier progress narration.

  • Evidence: packages/api/services/redisOutputParserAntigravity.ts:processResult and packages/core/src/agents/impl/utils/antigravityConversationLog.ts:buildAntigravityConversationLog

    1. A conversation streams an AGENT_RESPONSE containing intermediate narration such as “I will inspect the repository.”
    2. Subsequent tool steps execute. A later response step carries usage but no text_delta, a shape already present in the supplied stream fixture.
    3. The terminal result supplies the final answer in result.response.
    4. Both new converters suppress that response because any narration exists for the conversation. The live view retains only the earlier progress text, and the persisted conversation’s result has empty content.

    static trace: Both suppression conditions test conversation-wide text presence, without comparing the terminal response with the final narrated response. The separate agentResult.summary does not repair the live projection or the persisted conversation content. Existing tests explicitly accept suppression of a terminal response containing additional information, so they do not protect this case.

  • Minimum fix: Compare the terminal response against the final narrated response and preserve distinct final content in both paths. Continue suppressing genuine duplicates and truncated copies of an already complete streamed answer. Add a regression covering intermediate narration followed by a final answer supplied only in result.response.

Suggestions

These are optional follow-ups and are not sent to /fix.

S2: 🟢 Share tool interpretation rules

The live projector and persisted-log converter separately implement terminal states, tool metadata extraction, and command-exit detection. A small shared helper could prevent their behavior diverging; the persisted path already merges metadata across updates while the live path uses individual snapshots. This is optional cleanup, since duplication alone does not demonstrate another merge blocker.

Score

The implementation addresses the main observability gaps with focused fixtures and persistence coverage, but final-response suppression can discard meaningful output. The remaining correction is localized; checks currently report no failures.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 45s
  • Tokens: 68,431 (67,453 in / 978 out)
  • Cost: $0.59

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F2 S2

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit c41b0d4

Addressed 1 AI review comment (IDs: 7222775514)

Addressed finding F2

Summary of Changes

I fixed F2. Both converters now keep the final answer when the terminal response differs from the narration that came before it.

What was wrong: the live view (packages/api/services/redisOutputParserAntigravity.ts) and the saved conversation log (packages/core/src/agents/impl/utils/antigravityConversationLog.ts) both dropped result.response whenever the conversation had streamed any narration. A run that said "I will inspect the repository." and later gave its real answer only in the result ended up showing just the progress text.

The fix: each path now tracks the final narration, meaning the text streamed since the conversation started or since its last new tool step. Narration before a tool call counts as progress, not as the answer. A small helper, repeatsFinalNarration, in each file decides what to drop:

  • The response is suppressed only if it is empty, equal to the final narration (ignoring surrounding whitespace), or a cut-off copy of it. The truncated result.response in the real agy 1.5 stream fixture is still not repeated.
  • Any other response is kept: in the live view as a thought, and in the saved log as the result entry's text. That includes a response that adds to the final narration.

The tracking follows a tool step's first update only, so a late "finished" update for an earlier tool doesn't wipe narration that came after it. Each package has its own copy of the helper; I didn't add a shared module for it.

Tests:

  • test/redisOutputParser.test.ts: the existing test that expected "Done. Added subtract.\n\nAll tests pass." to be dropped now expects it to be kept. I added two tests. One covers progress narration, then a tool step, then an answer step with usage but no text, then the answer only in result.response, which is now kept. The other covers a final answer after tools that the result repeats (with extra whitespace), which is not repeated.
  • test/antigravityTaskTranscript.test.ts: one new test runs the same shape through buildAntigravityConversationLog. It covers a distinct final answer (kept), an exact duplicate (dropped), a cut-off copy (dropped) and an extended answer (kept).

Verification: redisOutputParser, antigravityTaskTranscript and llmMetricsRecording all pass. With the two source files reset to HEAD, the new tests and the updated one fail as expected. ESLint with zero warnings allowed passes, and tsc --noEmit is clean for both packages/core and packages/api.

Separate finding, not changed: antigravityOutputParser.ts has an older analysis-filter rule that suppresses a terminal response only when it exactly matches all the narration streamed for the conversation. It isn't part of this PR's changes, so I left it alone.

There are no previews: this changes how output is parsed, and there is no new screen state to capture.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (2 files)
    • packages/api/services/redisOutputParserAntigravity.ts (+21/−9)
    • packages/core/src/agents/impl/utils/antigravityConversationLog.ts (+24/−8)
  • Low risk (2 files)
    • test/antigravityTaskTranscript.test.ts (+23/−0)
    • test/redisOutputParser.test.ts (+38/−1)

Diff size: 4 files changed, +106/−18 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 5m 34s
  • Tokens: 881,251 (872,013 in / 9,238 out)
  • Cost: $0.68

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

I fixed F2. Both converters now keep the final answer when the terminal response differs from the narration that came before it.

**What was wrong:** the live view (`packages/api/services/redisOutputParserAntigravity.ts`) and the saved conversation log (`packages/core/src/agents/impl/utils/antigravityConversationLog.ts`) both dropped `result.response` whenever the conversation had streamed *any* narration. A run that said "I will inspect the repository." and later gave its real answer only in the result ended up showing just the progress text.

**The fix:** each path now tracks the *final narration*, meaning the text streamed since the conversation started or since its last new tool step. Narration before a tool call counts as progress, not as the answer. A small helper, `repeatsFinalNarration`, in each file decides what to drop:
- The response is suppressed only if it is empty, equal to the final narration (ignoring surrounding whitespace), or a cut-off copy of it. The truncated `result.response` in the real agy 1.5 stream fixture is still not repeated.
- Any other response is kept: in the live view as a thought, and in the saved log as the `result` entry's text. That includes a response that adds to the final narration.

The tracking follows a tool step's first update only, so a late "finished" update for an earlier tool doesn't wipe narration that came after it. Each package has its own copy of the helper; I didn't add a shared module for it.

**Tests:**
- `test/redisOutputParser.test.ts`: the existing test that expected "Done. Added subtract.\n\nAll tests pass." to be dropped now expects it to be kept. I added two tests. One covers progress narration, then a tool step, then an answer step with usage but no text, then the answer only in `result.response`, which is now kept. The other covers a final answer after tools that the result repeats (with extra whitespace), which is not repeated.
- `test/antigravityTaskTranscript.test.ts`: one new test runs the same shape through `buildAntigravityConversationLog`. It covers a distinct final answer (kept), an exact duplicate (dropped), a cut-off copy (dropped) and an extended answer (kept).

**Verification:** `redisOutputParser`, `antigravityTaskTranscript` and `llmMetricsRecording` all pass. With the two source files reset to HEAD, the new tests and the updated one fail as expected. ESLint with zero warnings allowed passes, and `tsc --noEmit` is clean for both `packages/core` and `packages/api`.

**Separate finding, not changed:** `antigravityOutputParser.ts` has an older analysis-filter rule that suppresses a terminal response only when it exactly matches all the narration streamed for the conversation. It isn't part of this PR's changes, so I left it alone.

There are no previews: this changes how output is parsed, and there is no new screen state to capture.

PR: #3840
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5

ProPR-Agent: claude/claude-opus-5-5
@propr-dev

propr-dev Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR addresses task streaming, transcript export, persisted tool activity, and session-based cost attribution. The implementation is cohesive and appears ready to merge within the supplied scope, conditional on pending checks completing successfully.

✅ Usable transcript export — A dedicated writable mount carries transcripts outside the read-only workspace mounts, with explicit export warnings and cleanup.

✅ Structured tool persistence — Stream updates are merged into named tool calls and results; unfinished calls remain unfinished, and nonzero command exits are marked as errors.

✅ Focused regression coverage — Added fixtures and tests cover transcript fallback, real stream tool parameters, usage totals, and final-response deduplication.

This was a static review of the supplied complete diff and surrounding excerpts; no commands or tests were run. The linked issue body is truncated, so requirements beyond its visible text could not be assessed.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S3: 🟢 Test final-answer rendering end to end

Add coverage passing a result-only final answer through conversation conversion, metrics persistence, and parseExecutionDetailsRows. The new converter stores that answer as a result containing text blocks, while the supplied rendering excerpt distinguishes assistant messages from other messages. Existing tests verify the converted log but do not establish the final task-page rendering. This is an optional integration test, not a demonstrated defect.

S4: 🟢 Maintain incremental usage totals

applyUsage scans every recorded step whenever usage changes, producing quadratic work across a long stream. Maintaining a running sum by subtracting the previous step snapshot and adding its replacement would avoid repeated scans. This is optional performance work; the supplied evidence does not demonstrate a material slowdown.

Score

The changes directly address the visible objective with substantial targeted coverage and no verified merge blocker. Current checks show zero failures, with five still pending; runtime behavior was not independently tested during this review.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 57s
  • Tokens: 72,761 (71,572 in / 1,189 out)
  • Cost: $0.66

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S3 S4

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 27, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3830 by Claude Opus 5.5] # Antigravity task runs show only the final summary: no execution events, no live activity ✅❽ [3830 by Claude Opus 5.5] # Antigravity task runs show only the final summary: no execution events, no live activity Nov 27, 2026
@integry
integry merged commit fe3cb59 into main Nov 27, 2026
48 checks passed
@propr-dev propr-dev Bot changed the title ✅❽ [3830 by Claude Opus 5.5] # Antigravity task runs show only the final summary: no execution events, no live activity [3830 by Claude Opus 5.5] # Antigravity task runs show only the final summary: no execution events, no live activity Nov 27, 2026
@integry
integry deleted the 3830/claude-opus-5-5-antigravity-task-runs-sho-20261127-1440-1so branch November 27, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

# Antigravity task runs show only the final summary: no execution events, no live activity

1 participant