fix(discord): title auto-threads after first response - #86712
Open
maxbomi wants to merge 4 commits into
Open
Conversation
maxbomi
force-pushed
the
fix/discord-contextual-auto-thread-title
branch
from
August 17, 2026 10:41
b237d77 to
470cb96
Compare
maxbomi
marked this pull request as ready for review
August 17, 2026 10:41
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.
What does this PR do?
Delays Discord auto-thread semantic title generation until the first assistant response completes, then generates a one-shot title from the opening request and completed user/tool/assistant turn instead of the opener alone.
Normal session auto-titling remains opener-based. The richer contextual title is limited to Hermes-created Discord auto-threads and is not persisted over the normal session title.
Related issue
Related to #78487.
Changes
Overlapping work disclosure
This PR intentionally overlaps the focused native rename call-shape repairs in #80869 and #82911. #78495, #82752, and #84501 address the same delivery failure through alternative adapter-tolerance/two-stage approaches. If maintainers land a focused call-shape fix first, this PR can be rebased to drop the duplicate hunk while retaining the distinct contextual-title feature and preserving contributor credit.
#87344 is complementary presentation/sanitizer work and may touch nearby
gateway/run.pycode. This PR retains context-driven, multilingual titling rather than adding English-only compaction heuristics.#29983 and #33862 cover periodic or pre-existing-thread renaming. This PR remains limited to Hermes-created auto-threads and a single title after the first completed response.
Verification
The four patches received independent Reviewer PASS before publication and were then rebased patch-equivalently onto current
main. Final publication head:470cb96323e3739eba6b517396129db1dfe15f1f.python -m pytest -o 'addopts=' -q \ tests/agent/test_title_generator.py \ tests/gateway/test_session_title_rename_lane.py \ tests/gateway/relay/test_relay_threads.py \ tests/gateway/test_discord_slash_commands.py python -m ruff check \ agent/title_generator.py \ gateway/run.py \ tests/agent/test_title_generator.py \ tests/gateway/test_session_title_rename_lane.py \ tests/gateway/relay/test_relay_threads.py python -m py_compile agent/title_generator.py gateway/run.py git diff --check origin/main...HEADResults:
py_compile, andgit diff --checkpassed.git range-diffconfirmed all four patches remained equivalent across the reviewed rebases; the final rebase was conflict-free and all affected gates were rerun.Wispr Flow scales hiring sustainablyPhilippine side hustles expose wage insecurityDesert site has clearer winter skiesGitHub CI state is reported separately by the PR; no claim of repository-wide green CI is made here.
Risk and rollback
Risk is limited to the Discord auto-created-thread title lane and one auxiliary title request after the first completed response. Existing session titles, Telegram behavior, human-renamed thread guards, and normal opener-based title persistence remain unchanged.
Rollback: revert the four commits in this PR; no migration or configuration rollback is required.
Checklist