Give completed Agent thoughts descriptive labels#650
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAgent Mode now tracks reasoning phases, requests bounded generated labels during streaming and completion, handles run and session lifecycle invalidation, and renders labels through an animated, accessible ChangesAgent thought labels
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
|
Thanks, this makes sense. I agree the current labels can sometimes sound like the agent is already making a tool call when it is really only considering one. I'll adjust that. As for the concept of collapsing the reasoning and tool calling into UI phases, that is already part of the broader [Agent timeline exploration](#635). I'm trying your suggestion from last week to break UX experiments into smaller chunks instead of trying to redesign the whole timeline at once. I also like the direction of letting activity stream in first and collapsing it afterward. For this pass, I’m going to try gemma, strengthen the prompt with examples that distinguish intent from actual execution, and test a bounded version of the continual summarizer: one provisional label during longer thoughts, followed by a final label when the thought ends. If gemma isn’t fast enough, I’ll try llama and retune the prompt for it. |
|
Makes sense. Make sure to set reasoning off for gemma. I have an example of that with my auto approver classifier for tool calls. |
Deploying maple with
|
| Latest commit: |
574f16e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ead9d143.maple-ca8.pages.dev |
| Branch Preview URL: | https://codex-issue-646-thought-labe.maple-ca8.pages.dev |
|
The direction here is to make Agent activity feel more legible without turning this PR into a full timeline redesign. Instead of leaving someone staring at a generic “Thinking” or “Thought” label, the UI provides a short description of the current reasoning phase. This remains a focused step within the broader [Agent timeline exploration](#635). The latest update:
|
|
Thanks for the follow-ups. The direction is improved, and the Gemma choice, disabled reasoning, provisional labels, and expanded intent-versus-execution examples all address the feedback in code. Before I approve this, I would like the following changes.
The current tests verify that prompt text and examples exist, then feed mocked labels back. They do not show that Gemma actually follows the distinction. In a live test, the reasoning said “Let me read both files…” and “I’ll read both files…”, but the generated label was “Reading agentThoughtLabels and package.json.” Read tool calls did follow, so the complete timeline was understandable, but the reasoning label still converted a prospective action into active execution. Please spend time prompt-engineering this with the actual model rather than inferring that the prompt should work. Build a small fixed evaluation set covering planning, considering a tool, actively executing a tool, interpreting results, and producing a final response, and test the real outputs. Since reasoning text is not authoritative tool state, the safest initial rule may be to reserve verbs such as Reading, Running, Searching, and Testing for labels derived from actual tool events. Reasoning-only labels can use Planning, Evaluating, Comparing, or similar language.
An older provisional request can currently finish after newer reasoning arrives and commit a label based on the obsolete snapshot. That older label can then become the durable fallback if final generation fails. An older thought summary must never overwrite a newer one. Please associate every request with the exact phase/snapshot generation that started it, discard any result that is no longer current, and abort the previous request whenever a newer snapshot or newer thought supersedes it. The final-label request also needs an AbortSignal. Completion, cancellation, task deletion, history replacement, unmount, and a newer thought beginning should terminate any request that is no longer useful. Please add lifecycle tests that deliberately resolve requests out of order and prove that only the newest valid result can commit.
The failed-run path currently discards the provisional scheduler entry. The subsequent authoritative reload reconstructs the phase without the retained label, producing a provisional → Thinking… → final/fallback regression on an already-terminal run. Failed runs should preserve and finish the active thought in the same way as completed runs. Only an explicitly cancelled run should discard it. Please cover completed, failed, and cancelled sequencing in AgentMode-level tests.
Please remove localStorage persistence and the positional v1 cache. We do not need to recover generated summaries after restarting the application or when opening older tasks. If a summary is not already available in current in-memory state, a completed historical reasoning block should simply show the fallback “Thought.” This also avoids establishing thought-N plus cached labels as a persistence contract while the Goose timeline representation is still evolving. No source hash, prompt migration, or recovery scheme is needed for this version because the generated metadata should be disposable. The normal success path and background-run recovery are moving in a good direction. The remaining work is to prove the model behavior and make concurrent request/lifecycle transitions deterministic before merging. |
|
Thanks for the detailed review — this was really helpful. I pushed a follow-up that addresses each of these areas.
The frontend suite is green with 196 tests, along with typecheck and formatting; lint has no errors. |
Generate phase-specific present-tense labels for completed Agent reasoning, keep Thinking visible while labels load, persist labels safely, and animate label transitions.
be7e88d to
c0739f8
Compare
|
Rebased this branch onto the latest master so the PR includes the recent trusted-local-skills and proxy updates. The only conflict was in AgentMode.tsx; I resolved it by preserving both the upstream skills-trust guard and the thought-label lifecycle. I reran the frontend checks afterward: 205 tests, typecheck, formatting, and lint all pass. |
|
One remaining merge blocker after the rebase: the frontend suite is still red both locally and in GitHub CI (203 passed, 2 failed), at frontend/src/services/agentThoughtLabels.test.ts:328 and :397. This looks like test synchronization rather than a production behavior failure: both requests are finally-chained and the assertions only flush one microtask. Replacing those await Promise.resolve() calls with the existing await nextTask() helper should let the chained settle/commit finish. Please fix those two tests, rerun the suite, and update the green-test claim. I do not have another blocker for the proof-of-concept scope. |
|
Fixed both test synchronization points in 574f16e. The assertions now use the existing nextTask() helper so the finally-to-then chain settles before results are checked; this is test-only and does not change production behavior. I reran the full frontend CI sequence with Bun 1.3.5: formatting, lint (0 errors), typecheck, and all 205 tests pass. Thanks for catching the runtime-specific timing difference. |
There was a problem hiding this comment.
Approved. The test synchronization fix is the correct scoped change, the full CI matrix is green, and I have no remaining blockers for this proof of concept. The branch is currently clean against master; please rebase if master advances before merge, then squash merge when ready.

Closes #646
What changed
auto:quick.Thinkingvisible while the label is pending, fall back toThoughtafter five seconds or on failure, and fade between label changes.Why
Completed reasoning rows previously used the hard-coded
Thoughtlabel, which gave no indication of what a phase had done. The generated-label prompt now treats the user request as background and prioritizes the current phase's latest concrete action, producing more useful labels without adding conversation history, tool data, or an immediate-action field.Impact
Label generation is non-blocking and does not delay Agent activity, approvals, final responses, or run completion. Invalid or failed responses remain a silent
Thoughtfallback, and loading old history does not trigger new requests.Validation
bun run test— 170 passingbun run typecheckbun run lint— 0 errors (12 existing warnings)bun run format:checkThe desktop binary was not built.
Summary by CodeRabbit