Skip to content

fix(session): prevent direct commands from consuming model context - #656

Open
xiami762 wants to merge 1 commit into
devfrom
fix/slash-command-context-usage
Open

fix(session): prevent direct commands from consuming model context#656
xiami762 wants to merge 1 commit into
devfrom
fix/slash-command-context-usage

Conversation

@xiami762

Copy link
Copy Markdown
Contributor

Summary

  • keep direct slash-command messages visible while excluding them from LLM context
  • prevent the builtin command pseudo-model from replacing the active model context window
  • add regression coverage for persistence, prompt conversion, token estimates, and context-model resolution

Root cause

Direct command output was persisted as regular conversation text and the context meter resolved builtin/command as a 4,096-token model. Large outputs such as /tools therefore filled the estimated context and were replayed to the next model call.

Validation

  • 252 related tests passed
  • Ruff checks passed
  • git diff --check passed

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