Remove system prompt logging from web backend - #360
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }), | ||
| ]; | ||
|
|
||
| // Emit a status event so hosts can confirm the system prompt was seeded into history. | ||
| emit({ | ||
| type: RuntimeEventType.Status, | ||
| payload: { | ||
| level: 'info', | ||
| message: 'System prompt injected into chat history.', | ||
| details: combinedSystemPrompt, |
There was a problem hiding this comment.
Avoid emitting system prompt contents in status events
The new status emit sends details: combinedSystemPrompt. In the web backend (packages/web/backend/src/server/utils.ts) status events are normalised and the details field is included in the payload forwarded over the agent WebSocket, so any connected client can read the entire system prompt via the network even though the goal of this change was to stop logging it on the backend. Unless the system prompt is intentionally public, this leaks internal instructions to end users. Consider emitting only a generic status message or gating the prompt contents behind a debug flag.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68fb826d35fc8328b282c8a1aea04b92