Skip to content

fix: make FOLLOW_UP_REMINDER opt-in via env var#37

Closed
leo-dower wants to merge 1 commit intoPleasePrompto:mainfrom
leo-dower:fix/follow-up-reminder-opt-in
Closed

fix: make FOLLOW_UP_REMINDER opt-in via env var#37
leo-dower wants to merge 1 commit intoPleasePrompto:mainfrom
leo-dower:fix/follow-up-reminder-opt-in

Conversation

@leo-dower
Copy link
Copy Markdown

Summary

Makes the FOLLOW_UP_REMINDER appended to ask_question answers opt-in via a new environment variable NOTEBOOKLM_FOLLOW_UP_REMINDER (default false). Addresses #28.

Why

The hardcoded reminder currently appended to every ask_question answer reads:

"EXTREMELY IMPORTANT: Is that ALL you need to know? [...] before you reply to the user, review their original request and this answer. If anything is still unclear or missing, ask me another question first."

This pattern — caps EXTREMELY IMPORTANT, imperative language directed at the assistant ("before you reply to the user"), instructions to take follow-up tool actions — is functionally indistinguishable from adversarial prompt injection. Well-aligned assistants (e.g., Claude Code) are instructed by their system prompts to flag suspected prompt injection in tool output before continuing. In practice this means every ask_question call generates a user-facing security warning, which is noisy and confusing.

See my comment on #28 for more context: #28 (comment)

Changes

  • src/config.ts — adds followUpReminderEnabled: boolean to the Config interface, defaults to false in DEFAULTS, and adds env var override via NOTEBOOKLM_FOLLOW_UP_REMINDER in applyEnvOverrides.
  • src/tools/handlers.ts — wraps the FOLLOW_UP_REMINDER concatenation in a ternary that checks CONFIG.followUpReminderEnabled. The constant itself is preserved unchanged so users who opt in get the exact same behavior as before.
  • docs/configuration.md — documents the new env var in the Response formatting section.

Default choice

I set the default to false (opt-in) for three reasons:

  1. The current default actively conflicts with the safety behavior of well-aligned assistants.
  2. For less robust models, unprompted follow-up reminders can create token waste loops — the concern already raised in Feature request: Add option to disable FOLLOW_UP_REMINDER and multi-pass strategy #28.
  3. Users who value the engagement behavior can opt in with a single env var; users who don't shouldn't have to discover the flag exists.

Happy to flip the default to true (preserving backward compatibility) if you prefer — just let me know and I'll update the PR. The flag itself is the important part.

Test plan

  • npm run build passes without errors
  • Compiled dist/tools/handlers.js shows the conditional append
  • Compiled dist/config.js includes the new default and env var override
  • Manual test with NOTEBOOKLM_FOLLOW_UP_REMINDER=true — reminder should appear
  • Manual test with env var unset — reminder should NOT appear (default behavior changes)

I can provide manual test logs if useful.

Backward compatibility

Behavioral change: existing users who rely on the reminder will need to set NOTEBOOKLM_FOLLOW_UP_REMINDER=true in their environment to preserve the old behavior. This is documented in docs/configuration.md. If this is a concern, I can invert the default to true (opt-out) and still solve the security flagging issue for users who set it to false.

🤖 Generated with Claude Code

The hardcoded reminder appended to every ask_question answer uses
imperative language ("EXTREMELY IMPORTANT:", "before you reply to the
user...") that well-aligned assistants may flag as prompt injection,
causing spurious security warnings and potentially blocked tool output.

Introduces NOTEBOOKLM_FOLLOW_UP_REMINDER env var (default false) to
control whether the reminder is appended. Behavior is preserved for
users who opt in by setting it to true.

Addresses PleasePrompto#28.
@PleasePrompto
Copy link
Copy Markdown
Owner

Thanks @leo-dower — your security framing was exactly right and v2.0.0 ships the same default: FOLLOW_UP_REMINDER is off by default, opt back in via NOTEBOOKLM_FOLLOW_UP_REMINDER=true. Closes #28. Crediting you in the release notes 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants