fix(agent-core): route session logs exclusively to session sink - #102
Merged
Conversation
🦋 Changeset detectedLatest commit: ec4afbd The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
- Session-tagged entries no longer duplicate into the global sink. - Stable main-agent context key omission now applies to all session lines with agentId=main, not only 'llm request'. - Update test expectations to match the new routing behavior.
kermanx
force-pushed
the
fix/session-log-routing
branch
from
May 27, 2026 04:50
8d6f4cb to
ec4afbd
Compare
Merged
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.
Related Issue
No related issue.
Problem
Session-tagged log entries were previously written to both the global log sink and the session-specific sink, causing duplication in global logs. Additionally, context key omission for stable main-agent fields (
sessionId,agentId) was only applied tollm requestmessages, leaving other main-agent session lines with redundant context fields.What changed
RootLoggerImpl.emitnow routes session-tagged entries exclusively to the resolved session sink. Non-session entries continue to go to the global sink, eliminating duplication.llmRequestSessionLogOmittedKeysis now invoked for every session entry, consistently omitting stable main-agent context keys from all session lines rather than onlyllm requestlines.logger.test.tsto match the new routing and omission behavior.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.