Skip to content

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

Merged
teknium1 merged 1 commit into
mainfrom
salvage/pr-19456
May 7, 2026
Merged

fix(compressor): soften summary prompt for content filters (salvage #19456)#21302
teknium1 merged 1 commit into
mainfrom
salvage/pr-19456

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

@teknium1 teknium1 commented May 7, 2026

Closes #19456 via salvage. Fixes #19362.

Summary

Context-compressor summary prompt used 'DIFFERENT assistant' / 'Do NOT respond' / 'injected as reference material' framing (inspired by OpenCode / Codex). Azure and OpenAI-compatible content filters flag that phrasing as prompt-injection-shaped and 400. Reword to plain 'structured checkpoint summary' / 'treat as source material' — same semantic goal, no injection-ish vocabulary. Structured checkpoint schema and safety constraints unchanged.

Validation

scripts/run_tests.sh tests/agent/test_context_compressor.py → 69 passed (includes new regression inspecting the live prompt).

Original author: @LeonSGP43.

@teknium1 teknium1 merged commit fc88eec into main May 7, 2026
8 of 11 checks passed
@teknium1 teknium1 deleted the salvage/pr-19456 branch May 7, 2026 13:42
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

🔎 Lint report: salvage/pr-19456 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 7532 on HEAD, 7532 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 3955 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@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 7, 2026
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

3 participants