Skip to content

fix(compressor): soften summary prompt for content filters#19456

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:codex/compressor-filter-safe-prompt
Closed

fix(compressor): soften summary prompt for content filters#19456
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:codex/compressor-filter-safe-prompt

Conversation

@LeonSGP43
Copy link
Copy Markdown
Contributor

Summary

  • Reword the context compressor summarizer prompt to avoid injection/handoff phrasing that can trip Azure/OpenAI-compatible content filters.
  • Keep the existing structured checkpoint schema and safety constraints intact.
  • Add a regression test that inspects the actual prompt sent to the summary LLM.

Why

Issue #19362 reports HTTP 400 content-filter failures during context compression with Azure/OpenAI-compatible providers. The previous prompt used phrases like "injected", "DIFFERENT assistant", and "Do NOT respond", which can resemble prompt-injection/jailbreak handling text even though the operation is internal summarization.

Verification

  • scripts/run_tests.sh tests/agent/test_context_compressor.py - 67 passed, 4 existing event-loop deprecation warnings

Fixes #19362

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder labels May 4, 2026
@alt-glitch
Copy link
Copy Markdown
Collaborator

Likely duplicate of #19370 and #19381 — all three PRs fix the same content-filter false-positive in context_compressor.py (issue #19362).

1 similar comment
@alt-glitch
Copy link
Copy Markdown
Collaborator

Likely duplicate of #19370 and #19381 — all three PRs fix the same content-filter false-positive in context_compressor.py (issue #19362).

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

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Azure/OpenAI-compatible content filter still false-positives on context compression prompt

2 participants