Repository navigation
Force a news search for trading-session questions - #36
Merged
Merged
Conversation
…evops fork Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
…eplies "at close" matched no gate keyword, so the model got the no-tools prompt and answered from the transcript, opening with "(no tool calls needed)". Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
…uestions" This reverts commit 7b22d53.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
robdevops
enabled auto-merge (squash)
October 15, 2026 22:33
…heisenberg-pz23nq # Conflicts: # lib/telegram/handlers.py
robdevops
added a commit
that referenced
this pull request
Oct 18, 2026
* SQLite: synchronous=NORMAL under WAL; period_cache WITHOUT ROWID New databases get the compact table; tools/period_cache_without_rowid.py converts an existing one. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw * /holdingnews says when the provider is busy; Sharesight MCP from robdevops fork Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw * Route market-session questions to tools and strip tool remarks from replies "at close" matched no gate keyword, so the model got the no-tools prompt and answered from the transcript, opening with "(no tool calls needed)". Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw * Make trading-session questions fetch current prices and news Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw * Force a search for trading-session questions Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw * Keep market data tools beside the forced search for session questions Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw * Revert "Keep market data tools beside the forced search for session questions" This reverts commit 7b22d53. * Session questions: ask for current news only, not prices Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw * Don't strip tool remarks from replies, so they stay visible Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw * Rename session prompt test Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw * Don't tell the model to avoid remarks about tools Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw * xAI: keep only the last text part of a message, and log multi-part messages Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw * Revert session changes (built on stale feedback) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw * xAI: log a message that has several text parts Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A reply to "at close" opened with "(no tool calls needed)". The string is model output, not bot code. "At close" matched no routing keyword, so the message got the no-tools prompt and the model answered from the earlier movers list in the transcript, not live data.
What
lib/llm/gate.py: newSESSION_WORDS(at/the/into/after close/open, pre-market, after hours, closing, opening) andis_session_question(). A match counts as a live question, so search is offered instead of the no-tools path.lib/prompts.py:chat_prompttakes asessionflag that adds "Search for current news before answering, and say why each stock moved. Don't reuse news or reasons from earlier messages in the transcript."lib/telegram/handlers.py: session questions passmust_search, so the first round must be a search and can't be answered from memory. Search only, not Yahoo quotes.Not changed
A "(no tool calls needed)"-style remark is not stripped from replies, so it stays visible when it happens.
Testing
make checkon Python 3.13.5: ruff clean, 294 tests pass. Not run against a live model.🤖 Generated with Claude Code
https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Generated by Claude Code