Replace "Preserve persona, character, and speaking-style cues" with
"Focus on factual content: what was discussed, decisions made, and
current state" to prevent the summarizer from injecting persona
descriptions into the summary (wasting tokens and potentially
conflicting with system prompt persona).
SDK auto-compaction hardcodes customInstructions to undefined, causing
summaries to always be generated in English. This breaks persona and
language continuity for non-English agents after context compaction.
Add a DEFAULT_COMPACTION_INSTRUCTIONS constant that instructs the
summarizer to preserve the conversation language and persona cues.
Wire a config → runtime → safeguard fallback chain so users can
override via compaction.customInstructions in the config.
Changes:
- New compaction-instructions.ts with resolve/compose utilities
- Config schema + types: add optional customInstructions field
- Runtime type: add customInstructions to WeakMap registry
- Extension builder: pass config value to runtime
- Safeguard extension: use precedence chain (event → config → default)
across all three summarization paths (dropped/history/split-turn)
- 35 unit tests covering precedence, normalization, Unicode-safe
truncation, and split-turn composition
* 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#42769
* ci: retrigger checks (windows shard timeout)
* fix: add changelog for Azure startup prompt fix (#43403) (thanks @xingsy97)
---------
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Adds the missing requiresOpenAiAnthropicToolPayload field to the
model-compat schema acceptance test, guarding against regressions
like #43339 where onboarding fails with "Unrecognized key".
Closes#43339
* fix(agents): avoid injecting memory file twice on case-insensitive mounts
On case-insensitive file systems mounted into Docker from macOS, both
MEMORY.md and memory.md pass fs.access() even when they are the same
underlying file. The previous dedup via fs.realpath() failed in this
scenario because realpath does not normalise case through the Docker
mount layer, so both paths were treated as distinct entries and the
same content was injected into the bootstrap context twice, wasting
tokens.
Fix by replacing the collect-then-dedup approach with an early-exit:
try MEMORY.md first; fall back to memory.md only when MEMORY.md is
absent. This makes the function return at most one entry regardless
of filesystem case-sensitivity.
* docs: clarify singular memory bootstrap fallback
* fix: note memory bootstrap fallback docs and changelog (#26054) (thanks @Lanfei)
---------
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
* fix(telegram): preserve media download transport policy
* refactor(telegram): thread media transport policy
* fix(telegram): sync fallback media policy
* fix: note telegram media transport fix (#44639)
Process messageData via handleDeltaEvent for both delta and final states
before resolving the turn, so ACP clients no longer drop the last visible
assistant text when the gateway sends the final message body on the
terminal chat event.
Closes#15377
Based on #17615
Co-authored-by: PJ Eby <3527052+pjeby@users.noreply.github.com>