Skip to content

docs: clarify session_mode scope — cron/channels/forks ignore it#2790

Merged
houko merged 1 commit into
librefang:mainfrom
neo-wanderer:docs/session-mode-cron-gotcha
Apr 20, 2026
Merged

docs: clarify session_mode scope — cron/channels/forks ignore it#2790
houko merged 1 commit into
librefang:mainfrom
neo-wanderer:docs/session-mode-cron-gotcha

Conversation

@neo-wanderer

Copy link
Copy Markdown
Contributor

Summary

The existing session_mode note in CLAUDE.md implies cron ticks honor session_mode, but the code doesn't wire it through: cron dispatch synthesizes SenderContext { channel: \"cron\", .. } (crates/librefang-kernel/src/kernel/mod.rs ~8867), which takes the channel branch in session resolution (~5346) before session_mode is consulted. All cron fires for an agent share one (agent, \"cron\") session regardless of manifest.

This PR updates CLAUDE.md to reflect actual behavior:

  • Honors session_mode: event triggers, agent_send.
  • Ignores session_mode: channel messages, cron jobs, forks.

No code changes. Pure doc clarification so contributors creating triggers/cron consciously pick session behavior.

Related

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.
@github-actions github-actions Bot added the ready-for-review PR is ready for maintainer review label Apr 20, 2026
neo-wanderer added a commit to neo-wanderer/librefang that referenced this pull request Apr 20, 2026
@github-actions github-actions Bot added area/docs Documentation and guides size/XS < 10 lines changed and removed ready-for-review PR is ready for maintainer review labels Apr 20, 2026
@github-actions
github-actions Bot requested a review from houko April 20, 2026 01:58
@github-actions github-actions Bot added the no-rust-required This task does not require Rust knowledge label Apr 20, 2026

@houko houko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — claims verified against code.

@houko
houko merged commit f68b59b into librefang:main Apr 20, 2026
27 of 28 checks passed
@houko houko mentioned this pull request Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation and guides no-rust-required This task does not require Rust knowledge size/XS < 10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants