Repository navigation
Agent2@narko: feat(run): report a local model's context window in the result - #52
Merged
Merged
Conversation
The result frame now carries Claude Code's `modelUsage[<model>].contextWindow` when the backend knows the window: a local model's, the context size llama-server runs it with (its metadata's context_window, else 4096; `contextSizeFor`, now shared with the server launch). It is keyed by the backend's model id and every id message_start carried, since a server may answer under another id. AgentMux's context meter reads that field, so a muxcode pane on a local model shows "tokens / window" instead of "tokens ctx". Remote backends report nothing, as before. Agent: Agent2@narko
There was a problem hiding this comment.
ReAgent Diagnostics
| Field | Value |
|---|---|
| ReAgent Version | 5.34.5+gad210a0 |
| Trigger | PR opened |
| Tier | STANDARD |
| Project Context | No CLAUDE.md |
| Model | claude-sonnet-5-5 |
| Effort | high |
| Ref Repos | Enabled (dev-tools, shared-infrastructure) |
| Merge Safety | No recent-code deletions |
| Review Time | 8s |
| Timestamp | 2026-10-06T23:29:29Z |
| Repository | agentmuxai/muxcode |
| PR | #52 |
Issues:
- [P1] package.json:3 - Missing version bump for code changes (new feature in src/, no diff found for the "version" field; the repo has no changeset directory, so each source PR carries its own minor bump)
Agent: Agent2@narko
There was a problem hiding this comment.
ReAgent Diagnostics
| Field | Value |
|---|---|
| ReAgent Version | 5.34.5+gad210a0 |
| Trigger | Re-review (new commits) |
| Tier | VERSION_CRITICAL |
| Project Context | No CLAUDE.md |
| Model | claude-sonnet-5-5 |
| Effort | high |
| Ref Repos | Enabled (dev-tools, shared-infrastructure) |
| Merge Safety | No recent-code deletions |
| Review Time | 5s |
| Timestamp | 2026-10-06T23:30:13Z |
| Repository | agentmuxai/muxcode |
| PR | #52 |
LGTM
Member
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Summary
AgentMux's agent pane shows a context meter, "tokens in context / window". It already reads muxcode's per-call usage from
message_start/assistantframes, but muxcode never reports a window, so a muxcode pane shows "N ctx" with no window and no fill band.The result frame now carries Claude Code's own field when the window is known:
context_windowfrom its metadata, else 4096. A newcontextSizeFor(modelPath)inllama-server/manager.tsis now shared by the server launch andLocalBackend.contextWindow, so the reported window is exactly the one in effect.message_startcarried, since a server may answer under another id. AgentMux matches the window tomessage.model.AgentMux side, for context: the meter takes the window from
result.modelUsage[*].contextWindow(agentmuxai/agentmuxfrontend/app/store/agent-pane-state/context-reading.ts).Tests
test/context-window.test.mjsexercises the built emitter:modelUsage;npm test: 81 pass, 1 skipped (as before).Agent: Agent2@narko
🤖 Generated with Claude Code