Codex/mar22 25 deployments#4
Open
rithwik1510 wants to merge 29 commits into
Open
Conversation
POLL_INTERVAL 800 → 400 ms, IPC_POLL_INTERVAL 400 → 150 ms. Cuts the steady-state message pickup delay roughly in half with no meaningful CPU overhead at idle. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds updateMessage with a 900 ms per-channel rate limit so streaming partial responses can be live-edited in Discord without hitting the API edit cap. Adds deleteMessage for cleanup of streaming placeholders. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a sliding-window trim on priorMessages after each turn. Defaults: 10 pairs max (OPENAI_MAX_PRIOR_TURNS) and 16 000 chars total (OPENAI_MAX_PRIOR_CHARS). Oldest pairs are evicted first, always in user+assistant units so context stays coherent. Also drops IPC poll default from 200 ms to 100 ms. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…g bypass
- routePrunedRegistry: plain_response gets ~3 KB of schemas instead of
50 KB; web_lookup gets web+memory only
- resolveInputBudgetChars: subtract priorMessages + tool schemas from
cloud total so prompt never overflows the context window
- resolveCloudToolLoopMaxTokens: cap conversational first iteration at
1 536 tokens to shorten TTFT
- shouldUseToolLoop bypass: plain_response+conversational+streaming
goes directly to native streaming path, skipping the tool loop
- streamThisIteration: first plain_response iteration also streams
- looksLikeStaleKnowledgeFallback: detect literal web_search("...")
text so forced-prefetch fallback still fires when model bypasses
structured tool_calls
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove the partial-result send/edit loop that caused the bot to send an initial message and then rewrite it token-by-token. Now partial chunks are buffered silently while the typing indicator runs; a single complete message is sent only when the final result arrives. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… set playwright-core does not bundle Chromium — launch() failed silently with no browser found. Now reads PLAYWRIGHT_EXECUTABLE_PATH (or CHROME_EXECUTABLE_PATH) so the bot can use the installed system Chrome. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ults Two problems caused the "Search provider: duckduckgo" dump reaching users: 1. runForcedWebPrefetch was passing raw tool output (with "Search provider:" and "Search results:" headers) directly to the synthesis model. Qwen3 echoed it verbatim. Now those headers are stripped before synthesis. 2. The synthesis system prompt was 1 line with no personality or formatting guidance. Replaced with an explicit prompt: synthesize conversationally, no raw dumps, no URLs, use bullet points / paragraphs. Also added the same anti-echo instruction to the main web lookup policy used by the tool loop synthesis step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When the model says "let me search / one moment please" but the turn took the fast streaming bypass (plain_response + conversational + streaming), shouldAttemptForcedPrefetch was never checked — the "I'll search" text was sent to Discord as the final answer with nothing following. Now, after streaming completes in the non-tool-loop path, if looksLikeStaleKnowledgeFallback matches the response, we create a web context, run runForcedWebPrefetch, and return the synthesized answer instead of the deferral text. Co-Authored-By: Claude Sonnet 4.6 <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.
Type of Change
.claude/skills/Description
For Skills