docs: clarify session_mode scope — cron/channels/forks ignore it#2790
Merged
Merged
Conversation
session_mode in AgentManifest only applies to event triggers and
agent_send. Cron jobs synthesize SenderContext{channel:"cron"} which
takes the channel branch, so all cron fires for an agent share one
(agent,"cron") session regardless of session_mode. Channel messages
and forks also bypass it. Document the coverage table and the cron
gotcha in CLAUDE.md so future trigger/cron registrations pick session
behavior consciously.
neo-wanderer
added a commit
to neo-wanderer/librefang
that referenced
this pull request
Apr 20, 2026
houko
approved these changes
Apr 20, 2026
houko
left a comment
Contributor
There was a problem hiding this comment.
LGTM — claims verified against code.
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
The existing
session_modenote inCLAUDE.mdimplies cron ticks honorsession_mode, but the code doesn't wire it through: cron dispatch synthesizesSenderContext { channel: \"cron\", .. }(crates/librefang-kernel/src/kernel/mod.rs~8867), which takes the channel branch in session resolution (~5346) beforesession_modeis consulted. All cron fires for an agent share one(agent, \"cron\")session regardless of manifest.This PR updates
CLAUDE.mdto reflect actual behavior:session_mode: event triggers,agent_send.session_mode: channel messages, cron jobs, forks.No code changes. Pure doc clarification so contributors creating triggers/cron consciously pick session behavior.
Related
session_modetoo — happy to follow up with a separate issue/PR if maintainers agree that's in scope.