Skip to content

fix(honcho): respect writeFrequency in sync_turn#19650

Open
starship-s wants to merge 1 commit into
NousResearch:mainfrom
starship-s:fix/honcho-sync-turn-write-frequency-routing
Open

fix(honcho): respect writeFrequency in sync_turn#19650
starship-s wants to merge 1 commit into
NousResearch:mainfrom
starship-s:fix/honcho-sync-turn-write-frequency-routing

Conversation

@starship-s

@starship-s starship-s commented May 4, 2026

Copy link
Copy Markdown

Context

Honcho's writeFrequency setting is the user's control for when completed conversation turns are written to Honcho: immediately, asynchronously, at session end, or every N turns. This matters for users who intentionally defer or batch writes, especially for session-end or cadence-based memory syncing.

The sync_turn() path was appending the turn and then calling _flush_session() directly. That bypassed HonchoSessionManager.save(), which is where writeFrequency routing is applied. As a result, deferred modes such as session and integer cadences could silently behave like per-turn writes.

Change

  • Route Honcho sync_turn() persistence through HonchoSessionManager.save() so configured writeFrequency modes are honored.
  • Add regression coverage for async, turn, session, and integer write-frequency routing from sync_turn().

Why this approach

HonchoSessionManager.save() already centralizes the write-frequency decision. Routing sync_turn() through it keeps the completed-turn sync path consistent with the rest of the Honcho session manager, while preserving immediate flushing for modes that are supposed to flush immediately.

This keeps the fix narrow: one routing change plus tests for each supported write-frequency mode.

Test Plan

  • python -m pytest tests/honcho_plugin/test_sync_turn_write_frequency.py tests/honcho_plugin/test_async_memory.py -q (45 passed)
  • python -m pytest tests/honcho_plugin -q (271 passed)

@alt-glitch alt-glitch added type/bug Something isn't working comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have labels May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants