Skip to content

fix(agent-core): refresh system prompt on resume when roleAdditional changes#4

Open
TennyZhuang wants to merge 1 commit into
ray/0.28.0-botiverse-roleadditionalfrom
xinran/refresh-roleadditional-on-resume-0.28
Open

fix(agent-core): refresh system prompt on resume when roleAdditional changes#4
TennyZhuang wants to merge 1 commit into
ray/0.28.0-botiverse-roleadditionalfrom
xinran/refresh-roleadditional-on-resume-0.28

Conversation

@TennyZhuang

@TennyZhuang TennyZhuang commented Jul 20, 2026

Copy link
Copy Markdown

This patch fixes the persisted-session resume path so that a fresh roleAdditional is applied to the system prompt.

Changes:

  • Store the current session's roleAdditional in agent metadata.
  • In resumePersistedAgent, after restoring the profile handle, compare the persisted roleAdditional with the current session's. If they differ, call agent.refreshSystemPrompt() and persist the updated metadata.
  • Add regression tests covering:
    1. Re-rendering the system prompt with the fresh roleAdditional after resume.
    2. Keeping the persisted prompt intact when roleAdditional is unchanged.
    3. Leaving an unresolved custom profile unchanged when roleAdditional changes.

Target: 0.28 candidate head e47c5495; replacement exact head f634fb92.

@TennyZhuang
TennyZhuang force-pushed the xinran/refresh-roleadditional-on-resume-0.28 branch from 1eb85a0 to f634fb9 Compare July 20, 2026 09:38
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.

1 participant