Skip to content

fix: Context messages incorrectly included in title generation#79

Open
nick-galluzzo wants to merge 1 commit into
ravitemer:mainfrom
nick-galluzzo:fix/context-message-filter
Open

fix: Context messages incorrectly included in title generation#79
nick-galluzzo wants to merge 1 commit into
ravitemer:mainfrom
nick-galluzzo:fix/context-message-filter

Conversation

@nick-galluzzo
Copy link
Copy Markdown

@nick-galluzzo nick-galluzzo commented Apr 17, 2026

Description

Context messages added via add_context() (rules files, attached files, buffers) were being included in title generation instead of filtered out. This caused every chat with injected context to produce a title based on that context rather than the user's actual question.

For example, a user has a CLAUDE.md loaded for every chat and is 1000 characters or more, every title is generated with that information only, and disregards the user message.

Related Issue(s)

NA (found while debugging)

Screenshots

All 3 titles are from the same setup and same message:

Screenshot 2026-04-17 at 3 01 17 PM Screenshot 2026-04-17 at 2 56 09 PM

Checklist

  • I've read the contributing guidelines and have adhered to them in this PR
  • I've updated the README and/or relevant docs pages
  • I've run make test to ensure all tests pass
  • I've run make format to format the code
  • I've run make docs to update the vimdoc pages

…sages

tag and context id are stored in msg._meta.tag and msg.context.id by add_message(), not in msg.opts. This is causing context messaqges to pass the filter and pollute title generation.
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