Skip to content

Fix silent reinforcement: recognize [SILENT] token#877

Open
pbranchu wants to merge 5 commits intoRightNow-AI:mainfrom
pbranchu:fix/silent-reinforcement
Open

Fix silent reinforcement: recognize [SILENT] token#877
pbranchu wants to merge 5 commits intoRightNow-AI:mainfrom
pbranchu:fix/silent-reinforcement

Conversation

@pbranchu
Copy link
Copy Markdown
Contributor

Summary

  • Add [SILENT] and [silent] to the NO_REPLY detection conditions in both streaming and non-streaming agent loop paths
  • When the agent outputs these tokens, store [no reply needed] in history instead of the literal [SILENT] text, which would otherwise reinforce silence in future turns
  • Fix pre-existing CI issues (clippy lints, test compilation, formatting)

Test plan

  • Verify cargo fmt, clippy, and tests pass in CI
  • Send a message where the agent should stay silent; verify [SILENT] is not stored literally in session history
  • Verify NO_REPLY token still works as before
  • Verify [[silent]] directive parsing still works as before

🤖 Generated with Claude Code

@jaberjaber23
Copy link
Copy Markdown
Member

Reviewed. Three issues before merge:

  1. Case sensitivity gap: the check matches [SILENT] and [silent] but misses [Silent] or other mixed-case variants that LLMs produce. Use .to_lowercase() for the comparison.

  2. No unit tests for the new [SILENT] detection. Add tests asserting that [SILENT], [silent], and [Silent] all route to the no-reply path and store "[no reply needed]" in session history.

  3. The openssl-src addition in Cargo.lock is unexplained and unrelated to this feature. Please explain or remove from this PR.

@pbranchu pbranchu force-pushed the fix/silent-reinforcement branch 5 times, most recently from adc77ca to e9f92d9 Compare March 27, 2026 16:12
Extract is_silent_token() helper for case-insensitive [SILENT] detection.
Revert unrelated Cargo.lock and formatting changes. Add unit tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pbranchu pbranchu force-pushed the fix/silent-reinforcement branch from e9f92d9 to 946363e Compare March 27, 2026 23:15
Philippe Branchu and others added 4 commits March 28, 2026 00:42
The previous commit accidentally included a complete MCP module rewrite
that removed Http transport and headers support, breaking compilation
against upstream kernel.rs tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
nicseltzer added a commit to nicseltzer/openfang that referenced this pull request Mar 29, 2026
Regenerated lockfile after cherry-picking 9 upstream PRs.
Fixed needless borrow in line.rs introduced by PR RightNow-AI#877 formatting.

Confidence: high
Scope-risk: narrow
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