Skip to content

Context window setting is now live, per agent tab - #24

Merged
DevMando merged 2 commits into
mainfrom
feature/per-request-num-ctx
Jul 28, 2026
Merged

Context window setting is now live, per agent tab#24
DevMando merged 2 commits into
mainfrom
feature/per-request-num-ctx

Conversation

@DevMando

Copy link
Copy Markdown
Owner

Summary

Companion to the MandoCode engine PR "Send the context window with every request and compact before overflow" (DevMando/MandoCode). It picks up the engine change that makes the context window setting real in every setup, and updates the desktop app's settings screen and messages that still described the old behavior. Merge the engine PR first, then this one.

What changed

  • Engine update (submodule pin). The context window now travels with every chat request instead of being applied only when MandoCode starts the Ollama engine itself — so it works even when the Ollama desktop app owns the engine — and conversations automatically compact before they outgrow the window instead of failing with an empty response.
  • The setting is now truly per-agent. Each agent tab's context window governs that tab's own conversations — something the old one-engine-one-window design couldn't do. The Settings field no longer carries the "app-wide" label, and its caption now explains that changes apply from the agent's next message with no restart.
  • Messages match reality. The model-switch notice used to say the new window size "takes effect when MandoCode starts Ollama"; it now says it applies from the next message. Internal architecture notes (README, ConfigCoordinator) and the CHANGELOG are updated to match.

Why it matters

The desktop settings screen was promising something it couldn't deliver: users could set a context window, see a confirmation, and still be running on whatever the Ollama desktop app happened to be set to. That mismatch was the root cause of small local models failing mid-conversation with an empty response.

Scope and risk

  • UI changes are text-only (a label, a caption, one transcript message) — no layout or behavior changes in the desktop code itself.
  • The behavior change arrives via the engine pin, which is covered by its own PR and test suite.

Verification

  • 223/223 desktop unit tests pass; the app builds clean against the updated engine.
  • Verified on hardware: model switches resize the live window automatically (8k on a sub-3B model, 32k on a 9B model), no restarts involved.

DevMando added 2 commits July 27, 2026 23:26
- Bump the MandoCode harness pin: the context window now rides on every chat
  request as num_ctx instead of an env var applied only when MandoCode starts
  the Ollama daemon, and conversations compact before the window overflows
- Context window setting is now genuinely per-agent: label and caption no
  longer call it app-wide, and changes apply from the agent's next message
- Model-switch message, ConfigCoordinator notes, README, and CHANGELOG updated
@DevMando
DevMando merged commit e54f1ea into main Jul 28, 2026
1 check passed
@DevMando
DevMando deleted the feature/per-request-num-ctx branch July 28, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant