← Back to PRs

#5992: Fix: /status shows correct think level when used with /think (fixes #5919)fix(auto-reply): /status shows correct think level when combined with…

by simran122 open 2026-02-01 05:26 View on GitHub →
## Summary When `/think` and `/status` were used in the same message (directive-only path), `/status` still showed the previous thinking level (e.g. "low") instead of the level just set by `/think`. This made it look like the `/think` command wasn’t applied, especially with reasoning-capable models like Gemini. ## Changes - In the directive-only reply path, status now uses `effectiveThinkLevel` (directive + session + default) when building the status reply, so the reported think level matches what is actually in effect after applying `/think`. - Ensures the status line reflects the level set by `/think` in the same message, not the pre-directive default. ## Testing - `reply.directive.directive-behavior.returns-status-alongside-directive-only-acks.e2e.test.ts` covers the combined `/think` + `/status` behavior. - Manual: send `/think high` and `/status` in one message; status should show "Think: high". Fixes #5919 <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR fixes `/status` in the directive-only path to report the *effective* thinking level when `/think` and `/status` are used in the same message. It adds an E2E test covering `/think high\n/status` and updates `applyInlineDirectiveOverrides` to compute `effectiveThinkLevel` (directive → session → default) and pass it into `buildStatusReply`, so status reflects the newly applied `/think` value. <h3>Confidence Score: 3/5</h3> - This PR is likely safe to merge, but the change to `resolveDefaultThinkingLevel` could subtly affect status semantics depending on how `buildStatusReply` uses it. - The functional change is small and well-covered by a new E2E test for the reported bug. However, repurposing a callback named `resolveDefaultThinkingLevel` to return an overridden/effective value may create incorrect status output in other scenarios if `buildStatusReply` relies on it to compute or display defaults. - src/auto-reply/reply/get-reply-directives-apply.ts (check how `buildStatusReply` interprets `resolveDefaultThinkingLevel`). <!-- greptile_other_comments_section --> <sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs