Sending a message cancels the context-window lookup, so `chatty chat -q` always uses the 128,000-token fallback
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start in src/chatty/ui/app.py at the run_worker calls around lines 417, 481, and 881, then check how Textual groups and cancels exclusive workers. Put the chat, regenerate, and compress workers in a separate group so they do not cancel context-window or model lookups. Verify with chatty chat -q and confirm the lookup can finish and set the reported context window.
Written by the indexing model from the issue text.
Description
send_message, regenerate and compress call run_worker(..., exclusive=True) (src/chatty/ui/app.py:417, 481 and 881) without a group, so they use the default group. In Textual, exclusive=True cancels every worker in the same group. That includes fetch_context_window (started from on_mount when context_window = "auto") and fetch_models (Ctrl+G), which are also in the default group.
Effect:
chatty chat -q query.txtsubmits the query fromon_mount, right after starting the context-window lookup, so the lookup is always cancelled. The context window silently stays at the 128,000-token fallback, with no warning, and RAG packing and compression decisions use that number. With a fake endpoint that reports 32,000 after 0.5 s, the window is 32,000 if the user waits and 128,000 if a message is submitted right away.- The same thing happens when a user sends a message before a slow
/modelscall returns, or while the model picker is loading.
Fix: put the chat, regenerate and compress workers in their own group (for example group="chat"), so exclusive=True only cancels each other.
- Dominant language
- Python
- Stars
- 0
- Forks
- 2
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 13
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lanl/chatty
-
area: rag bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
area: client bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area: config bug wrong-result
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
area: config bug wrong-result
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area: sessions bug data-loss
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
software-mansion-labs/Diplomat#20 ·
Maintainers usually reply within 1 day
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPossibly taken @lijy91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
libnativeapi/nativeapi#53 · 1 reaction ·
Maintainers usually reply within 1 day
-
View Counts discarded due to field name mismatchPossibly taken @rsiva0400 claimed this today. Opensite-bug triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Model version publishes the new UK firm entity as a personPossibly taken @vahid-ahmadi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/policyengine.py#764 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
spcl/HPCAgent-Bench#264 ·
Maintainers usually reply within 1 day