Skip to content

fix(agents): rephrase session reset prompt to avoid Azure content filter#43403

Merged
obviyus merged 3 commits intoopenclaw:mainfrom
xingsy97:wt/fix-azure-content-filter
Mar 13, 2026
Merged

fix(agents): rephrase session reset prompt to avoid Azure content filter#43403
obviyus merged 3 commits intoopenclaw:mainfrom
xingsy97:wt/fix-azure-content-filter

Conversation

@xingsy97
Copy link
Contributor

Problem

Azure OpenAI content filter flags the phrase Execute your Session Startup sequence now as potentially harmful, causing /new and /reset to return HTTP 400 for all Azure-hosted deployments.

Root Cause

The word "Execute" combined with the imperative "now" triggers Azure's content safety filter. This affects two prompt strings:

  • session-reset-prompt.ts — the bare session reset prompt sent on /new and /reset
  • post-compaction-context.ts — the post-compaction reinit instruction

Fix

Replace Execute your Session Startup sequence now with Run your Session Startup sequence. Semantics identical, avoids the false-positive.

Validation

All 28 affected tests updated and passing.

Closes #42769

@openclaw-barnacle openclaw-barnacle bot added gateway Gateway runtime size: XS labels Mar 11, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 11, 2026

Greptile Summary

This PR replaces Execute your Session Startup sequence now with Run your Session Startup sequence in two prompt string sources (session-reset-prompt.ts and post-compaction-context.ts) and updates all corresponding test assertions to match.

The change is a targeted workaround for Azure OpenAI's content safety filter, which flags the imperative "Execute … now" phrasing as potentially harmful, causing HTTP 400 errors on /new and /reset for Azure-hosted deployments. The replacement phrasing is semantically equivalent and all affected test files are kept in sync.

  • session-reset-prompt.ts and post-compaction-context.ts — prompt strings updated
  • 5 test files — assertions updated to match the new phrasing
  • No logic, behaviour, or API surface changes

Confidence Score: 5/5

  • This PR is safe to merge — it is a targeted text substitution with no logic or API surface changes.
  • The change is minimal and isolated: two prompt strings are rephrased to sidestep an Azure content filter false-positive, and every affected test assertion is updated consistently. No logic, data flow, or external interface is altered.
  • No files require special attention.

Last reviewed commit: f9d9bd2

@xingsy97
Copy link
Contributor Author

xingsy97 commented Mar 13, 2026

Hi @obviyus @altaywtf — this is a pure string replacement (greptile 5/5). Rephrases "Execute your Session Startup sequence now" to avoid Azure content filter false-positives on /new and /reset. Closes #42769.

xingsy97 and others added 3 commits March 13, 2026 15:05
Azure OpenAI's content filter flags the phrase 'Execute your Session
Startup sequence now' as potentially harmful, causing /new and /reset
to return 400 for all Azure-hosted deployments.

Replace 'Execute ... now' with 'Run your Session Startup sequence' in
session-reset-prompt.ts and post-compaction-context.ts. The semantics
are identical but the softer phrasing avoids the false-positive.

Closes openclaw#42769
@obviyus obviyus force-pushed the wt/fix-azure-content-filter branch from 7452ae7 to 298fcbe Compare March 13, 2026 09:36
@obviyus obviyus merged commit 2c39cd0 into openclaw:main Mar 13, 2026
27 checks passed
@obviyus
Copy link
Contributor

obviyus commented Mar 13, 2026

Landed on main.

Thanks @xingsy97.

@xingsy97 xingsy97 deleted the wt/fix-azure-content-filter branch March 13, 2026 09:43
mrosmarin added a commit to mrosmarin/openclaw that referenced this pull request Mar 13, 2026
* main: (168 commits)
  fix: stabilize macos daemon onboarding
  fix(ui): keep shared auth on insecure control-ui connects (openclaw#45088)
  docs(plugins): clarify workspace shadowing
  fix(node-host): harden perl approval binding
  fix(node-host): harden pnpm approval binding
  fix(discovery): add missing domain to wideArea Zod config schema (openclaw#35615)
  chore(gitignore): add docker-compose override (openclaw#42879)
  feat(ios): add onboarding welcome pager (openclaw#45054)
  fix(signal): add groups config to Signal channel schema (openclaw#27199)
  fix: restore web fetch firecrawl config in runtime zod schema (openclaw#42583)
  fix: polish Android QR scanner onboarding (openclaw#45021)
  fix(android): use Google Code Scanner for onboarding QR
  fix(config): add missing params field to agents.list[] validation schema (openclaw#41171)
  docs(contributing): update Android app ownership
  fix(agents): rephrase session reset prompt to avoid Azure content filter (openclaw#43403)
  test(config): cover requiresOpenAiAnthropicToolPayload in compat schema fixture
  fix(agents): respect explicit user compat overrides for non-native openai-completions (openclaw#44432)
  Android: fix HttpURLConnection leak in TalkModeVoiceResolver (openclaw#43780)
  Docker: add OPENCLAW_TZ timezone support (openclaw#34119)
  fix(agents): avoid injecting memory file twice on case-insensitive mounts (openclaw#26054)
  ...
hougangdev pushed a commit to hougangdev/clawdbot that referenced this pull request Mar 14, 2026
…ter (openclaw#43403)

* fix(agents): rephrase session reset prompt to avoid Azure content filter

Azure OpenAI's content filter flags the phrase 'Execute your Session
Startup sequence now' as potentially harmful, causing /new and /reset
to return 400 for all Azure-hosted deployments.

Replace 'Execute ... now' with 'Run your Session Startup sequence' in
session-reset-prompt.ts and post-compaction-context.ts. The semantics
are identical but the softer phrasing avoids the false-positive.

Closes openclaw#42769

* ci: retrigger checks (windows shard timeout)

* fix: add changelog for Azure startup prompt fix (openclaw#43403) (thanks @xingsy97)

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
ecochran76 pushed a commit to ecochran76/openclaw that referenced this pull request Mar 14, 2026
…ter (openclaw#43403)

* fix(agents): rephrase session reset prompt to avoid Azure content filter

Azure OpenAI's content filter flags the phrase 'Execute your Session
Startup sequence now' as potentially harmful, causing /new and /reset
to return 400 for all Azure-hosted deployments.

Replace 'Execute ... now' with 'Run your Session Startup sequence' in
session-reset-prompt.ts and post-compaction-context.ts. The semantics
are identical but the softer phrasing avoids the false-positive.

Closes openclaw#42769

* ci: retrigger checks (windows shard timeout)

* fix: add changelog for Azure startup prompt fix (openclaw#43403) (thanks @xingsy97)

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Model/provider integration bug (Azure OpenAI content filter false-positive trigger)

2 participants