fix(agents): pass session thinking/reasoning levels to session_status display#10998
fix(agents): pass session thinking/reasoning levels to session_status display#10998wony2 wants to merge 3 commits into
Conversation
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: src/auto-reply/status.ts
Line: 375:382
Comment:
**Reasoning level override ignored**
`buildStatusMessage()` currently hard-codes `reasoningLevel` to `args.resolvedReasoning ?? "off"`, so even if a session has `sessionEntry.reasoningLevel` set (and callers don’t pass `resolvedReasoning`), the status card will always show `Reasoning: off`. If the intent of this PR is “session_status reads per-session thinking/reasoning… from the session entry”, `reasoningLevel` should follow the same precedence as the other levels (i.e., include `args.sessionEntry?.reasoningLevel` when `resolvedReasoning` is not provided). This mismatch is now more visible because `session-status-tool.ts` is the only path passing `resolvedReasoning`.
How can I resolve this? If you propose a fix, please make it concise. |
|
Thanks for flagging this, Greptile. You're correct that
Only More importantly, all current callers of
So the "always shows off" scenario doesn't occur in practice. That said, adding a defensive |
|
The macOS CI failure is unrelated to this change — all 847 test files (5,383 tests) passed successfully. The |
bfc1ccb to
f92900f
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
c13ff48 to
f6bb4b2
Compare
|
Closing as AI-assisted stale-fix triage. Linked issue #10867 ("Thinking Level Inconsistencies in session_status Display") is currently closed and was closed on 2026-02-22T19:12:52Z with state reason completed. If this specific implementation is still needed on current main, please reopen #10998 (or open a new focused fix PR) and reference #10867 for fast re-triage. |
Summary
Closes #10867. The
session_statustool now reads per-session thinking/reasoning/verbose/elevatedlevels from the session entry instead of always falling back to agent defaults.
lobster-biscuit
Problem
After running
/reasoning medium, thesession_statustool displays "Think: off" instead of"Think: medium". The levels are correctly stored in the session entry but never passed to
buildStatusMessage().Root Cause
session-status-tool.tscallsbuildStatusMessage()without theresolvedThink,resolvedVerbose,resolvedReasoning, orresolvedElevatedparameters. The function fallsback to
args.agent?.thinkingDefault ?? "off", ignoring per-session overrides stored insessionEntry.thinkingLeveletc.Solution / Behavior Changes
thinkingLevel,verboseLevel,reasoningLevel,elevatedLevelfrom the session entrynormalizeThinkLevel()etc. fromthinking.tsresolvedThink/resolvedVerbose/resolvedReasoning/resolvedElevatedtobuildStatusMessage()Codebase and GitHub Search
buildStatusMessagealready acceptsresolvedThink/resolvedVerbose/resolvedReasoning/resolvedElevated(status.ts:62-65) — just not being passed from the toolrunEmbeddedAttempt) correctly passes these params; only thesession_statustool path was missing thembuildStatusMessageare affectedTesting
pnpm buildpassedpnpm lintpassedpnpm checkpassedpnpm testpassed (full suite — 219 tests)thinkingLevel: "medium"→ status contains "medium"Sign-Off
Greptile Overview
Greptile Summary
session_statustool to read per-session thinking/verbose/reasoning/elevated levels from the session entry and pass them through tobuildStatusMessage().normalizeThinkLevel, etc.) to keep level strings consistent with other codepaths.thinkingLevelis reflected in the status output and that default behavior still returns a status text when no overrides are present.Confidence Score: 3/5
buildStatusMessage()does not considersessionEntry.reasoningLevelunless callers explicitly passresolvedReasoning, which contradicts the PR’s stated behavior and can cause incorrect status output in other call sites.(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!