Repository navigation
ADFA-7340 AI Agent Gemini 1.1.1, AI Agent Claude 1.0.1: say why turns still need merging - #191
davidschachterADFA wants to merge 7 commits into
Conversation
The comment on buildContents said the transcript stops alternating because AI Core's agent loop drops an ASSISTANT turn that carried only a native call. ADFA-7340 (addons #188) makes AI Core store a turn naming that call, so the reason is out of date. The merge is still needed: SYSTEM and TOOL turns go as user turns here, and chats saved by an older AI Core still have the user message and its tool results side by side. Comment only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
A PATCH bump for the comment change, as the repository's CLAUDE.md asks of any change to a plugin. versionCode 3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
… repeat The first wording said a chat saved by an older AI Core keeps the user message and its tool results side by side. A restored chat is rebuilt from its messages and keeps no tool turns, so that was wrong. What the rebuild does leave out is an agent reply that held only a native call, or that never finished, which can put two user turns in a row, before and after ADFA-7340. Comment only; the version stays 1.1.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
…peat An independent review of this PR found the Gemini comment true but incomplete, and AI Agent Claude's overstated: - AI Core's agent loop stores no assistant turn for a reply with no text, so the user turn it adds next (asking the model to go on, or for a required tool) follows the previous user turn. That holds with ADFA-7340 too, which adds a turn only for a reply that called tools. - A chat AI Core restores leaves out an agent reply that had no text or never finished, and starts with the compaction summary as a user turn. - AI Core sends no SYSTEM or TOOL turns; other callers may. Claude's comment said results as user text "leave runs" of same-role turns; with ADFA-7340 the results follow the stored call turn, so it now names the cases above. Comments only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
A PATCH bump for the comment change, as the repository's CLAUDE.md asks of any change to a plugin. versionCode 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
…no call The re-check of a6c511a: with ADFA-7340, AI Core stores a turn for a reply that called tools even when it has no text, so the case that leaves two user turns in a row is a reply with no text and no call. Both comments say so, and the Claude one is rewrapped. Comments only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
|
@hal-eisen-adfa This is ready for review now (David, 2026-11-30). It started as one Gemini comment and now also corrects AI Agent Claude's similar comment, with AI Agent Claude going to 1.0.1. That follows an independent review that found the Gemini wording incomplete and the Claude one overstated. Comments and versions only; both plugins' tests, |
davidschachterADFA
left a comment
There was a problem hiding this comment.
Review of #191 at 30e8606ca7. Base main; read against #188's head and main.
MINOR
- plugins/AI-Agent-Gemini/src/main/kotlin/com/itsaky/androidide/plugins/aiagentgemini/backend/GeminiBackend.kt:480 - comment omits call-only reply drop that is still true until #188 merges
Verdict: COMMENT. This PR is authored by the account posting the review, and GitHub refuses APPROVE and REQUEST_CHANGES on your own PR. Severity rules: CodeOnTheGo REVIEW.md and CLAUDE.md (a ticket moves to QA with no outstanding critical, high or medium findings); addons has no written rule, so the default applied.
Generated by Claude Code
| * always alternates: the agent loop drops an ASSISTANT turn that carried only a native call | ||
| * and no prose, leaving the user message and the tool results it produced adjacent. | ||
| * Consecutive same-role turns are merged into one content, because the history a caller passes | ||
| * does not always alternate. AI Core's agent loop stores no assistant turn for a reply with no |
There was a problem hiding this comment.
MINOR: The reworded comment says AI Core stores no assistant turn for a reply with no text and no call, which reads as if a call-only reply is stored; at this PR's head and on main it is not.
AgentLoop.kt:300 only stores a turn when historyText is non-blank, and a native call with no prose has a blank one, so the call-only reply is also dropped and the user message and tool results sit adjacent. Only #188 (c3eed33, bareCallTurn) changes that. The PR body says it merges any time and the comments hold either way, but before #188 lands this comment omits the most common cause of repeated roles, and a reader will think the merge is needed only for the rare cases.
Fix: merge after #188, or add 'and, until addons #188, a reply that carried only a native call' to the comment.
Generated by Claude Code
…a bare native call The comments said AI Core stores no assistant turn "for a reply with no text and no call", which implies a reply that is only a native call is stored. On AI Core without ADFA-7340 (addons #188) it is not: the loop stores nothing for blank text and then adds the tool results as a user turn, which is the most common run of same-role turns. Both comments now say so, and that AI Core from ADFA-7340 on stores a turn naming the call. (Review on addons #191, ADFA-7131 comment 41750.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn
|
@hal-eisen-adfa e601ddf fixes the one MINOR from the latest review of this PR. Both comments said AI Core stores no assistant turn "for a reply with no text and no call", which implies a reply that is only a native call is stored. That's true only once addons #188 lands. Without it, AI Core stores nothing for a call made with no prose and then adds the tool results as a user turn, which is the most common run of same-role turns. Both comments now say that, and that AI Core stores a turn naming the call from ADFA-7340 on, so they hold either way. Comments only; Gemini 128 and Claude 210 tests, |
ADFA-7340
What: corrects one comment in AI Agent Gemini and one in AI Agent Claude, and bumps the two plugins to 1.1.1 (versionCode 3) and 1.0.1 (versionCode 2), as the repository's CLAUDE.md asks of any change. No code changes.
Why: both backends merge consecutive same-role turns. Their comments gave the wrong reason.
The merge is still needed, and both comments now give the real reasons, which hold with and without #188:
ChatViewModel.rebuildHistoryFrom) leaves out an agent reply that had no text or never finished. It also starts with the compaction summary as a user turn.Commits:
Tests: at e601ddf,
testDebugUnitTest(Gemini 128, Claude 210),assemblePluginfor both, andaddons checkpass locally.Merging: any time; the comments are true before and after #188.
Version clash: #193 (ADFA-7286) also takes AI Agent Claude to 1.0.1 (versionCode 2), and git merges the two without a conflict. Whichever of #191 and #193 merges second must be bumped to 1.0.2 (versionCode 3) before it merges.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Vh2DAYT7GPoC2cDzo8LErn