Skip to content

[codex] inject sealos context only on first gateway session turn#4

Merged
zjy365 merged 1 commit intomainfrom
codex/once-sealos-context-per-session
Apr 22, 2026
Merged

[codex] inject sealos context only on first gateway session turn#4
zjy365 merged 1 commit intomainfrom
codex/once-sealos-context-per-session

Conversation

@Che-Zhu
Copy link
Copy Markdown
Collaborator

@Che-Zhu Che-Zhu commented Apr 22, 2026

Summary

  • inject Sealos deploy context only on the first turn of a Codex gateway session
  • move prompt augmentation into the shared gateway runner so both chat-v2 and legacy gateway turn paths behave the same
  • keep persisted task messages unchanged by sending the raw user message through storage and conditionally augmenting only the gateway prompt

Root Cause

The app was prepending Sealos deploy context on every user turn before sending prompts to the gateway, which caused follow-up messages in the same session to carry repeated context.

Validation

  • pnpm format
  • pnpm format:check
  • pnpm type-check
  • pnpm lint (existing repository warnings only)
  • manual runtime verification that only the first turn in a session includes the Sealos context

@Che-Zhu Che-Zhu marked this pull request as ready for review April 22, 2026 10:25
@zjy365 zjy365 merged commit 2ba4a41 into main Apr 22, 2026
4 of 5 checks passed
@Che-Zhu Che-Zhu deleted the codex/once-sealos-context-per-session branch April 22, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants