feat: proactive engagement — follow-up suggestions, open loops, nudges#91
Merged
Conversation
runTaskHeadless built the agent without MemoryDir/MemoryConfig, so scheduled jobs could not analyze memory or past sessions - the prerequisite for memory-driven proactive messages. Mirrors the interactive-run wiring (cmd/odek/main.go). Test proves a pre-seeded extended-memory atom reaches the model context in a headless run.
…ps, nudges engine - recall-time predicted intents are now captured (>=0.6 confidence, cap 3) instead of discarded, exposed via ExtendedMemory.LastFollowUps and MemoryManager.FollowUpSuggestions - zero extra LLM cost - the extractor now emits 'question' atoms (unanswered user questions) and 'goal' atoms (stated intentions); new OpenLoops query surfaces them as the blind-spot data source - new ProactiveNudges engine: one LLM call synthesizes concise nudges from open loops, stale goals, and user-model focus; persisted anti-annoyance ledger (nudges.json) enforces an opt-in master switch (default off), a daily cap (1), and a per-kind cooldown (24h); preview (ProactiveNudges) never consumes the budget; all failures degrade to empty so proactivity can never break a turn - config: 6 new memory.extended keys with env plumbing
- run/REPL print a compact '-- You might also want to --' block after answers (engaging/enhance modes only; presentation-only, never part of the response transcript) - ReturnAfterBreak extracted into a shared helper and wired into REPL session resume and Telegram /resume (previously run --continue only) - new 'odek memory extended nudges' preview command (shows pending nudges without consuming the daily cap) - Telegram bot: agent now gets full memory wiring, and after each completed turn an opt-in (proactive_nudges_enabled) background TakeNudges pushes a nudge message, honoring the shared persisted caps
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
odek | ec80de2 | Commit Preview URL Branch Preview URL |
Jul 22 2026, 01:56 PM |
…odes The suggestions gate only matched the literal strings engaging/enhance, but the loop treats every mode except off/verbose as engaging - so configs with a legacy or invalid interaction_mode (e.g. "all", which some configs carry from the tool_progress domain) silently suppressed the block while otherwise behaving as engaging. Gate on exclusion (only verbose/off suppress), matching the loop's interpretation.
Both profiles now opt into follow-up suggestions and proactive nudges (capped at 1/day with a 24h per-kind cooldown, stale goals after 7 days), matching the batteries-included intent of the compose stack - the telegram profiles get the push behavior, all profiles get follow-up suggestions after answers.
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.
Implements the approved Layer 1+2 design: the agent now anticipates follow-ups, tracks open loops (unanswered questions / stale goals), and can deliver opt-in proactive nudges derived from memory — all built on previously dormant machinery. Four per-workstream commits.
WS4 — scheduler memory wiring (
892e755)runTaskHeadlessbuilt scheduled-job agents withoutMemoryDir/MemoryConfig, so cron jobs couldn't analyze memory. Now wired; regression test proves a seeded atom reaches the model context headless. This unlocks memory-driven scheduled messages with zero further code (odek schedule add --deliver telegram "review my open goals and nudge me").Core (
4b78f1a)follow_up_suggestion_min_confidence, default 0.6, cap 3) are now captured and exposed viaExtendedMemory.LastFollowUps/MemoryManager.FollowUpSuggestions. Zero extra LLM cost.questionatoms (unanswered user questions) andgoalatoms (stated intentions); newOpenLoopsquery is the blind-spot data source.open_question/stale_goal/blocker/drift) from open loops, goals stale ≥nudge_stale_goal_days(7), and user-model focus. Anti-annoyance is persisted (nudges.json): opt-in master switch (default off), 1/day cap, 24h per-kind cooldown. Preview never consumes the budget; every failure degrades to empty — proactivity can never break a turn.Surfaces (
1f4203d)── You might also want to ──block printed after answers in run/REPL (engaging/enhance only; presentation-only, never in transcripts).run --continueonly) extracted into a shared helper, wired into REPL resume and Telegram/resume.odek memory extended nudges— preview pending nudges (kind + source atoms) without consuming the cap.TakeNudgespushes a nudge message, honoring the shared persisted caps (no double-firing with CLI/other surfaces).Verification
go test ./...— all green;-racegreen on memory/config/telegram.golangci-lint run ./...— 0 issues.Docs
docs/EXTENDED_MEMORY.md(new P6 section + config rows),docs/CONFIG.md(6 new keys),docs/MEMORY.md,docs/SCHEDULES.md(memory-wired jobs + nudge cron example).Out of scope (Layer 3, future): Web UI idle-push, serve-hosted scheduler, timing nudges via
InteractionPatterns.