Skip to content

Remove system prompt logging from web backend - #360

Merged
rogeralsing merged 1 commit into
mainfrom
codex/log-system-prompt-on-startup
Oct 24, 2025
Merged

rogeralsing merged 1 commit into
mainfrom
codex/log-system-prompt-on-startup

Conversation

@rogeralsing

Copy link
Copy Markdown
Contributor

Summary

  • revert the web backend entrypoint to stop importing and logging the core system prompt
  • drop the SYSTEM_PROMPT ambient declaration from the backend's OpenAgent typings and update the directory context accordingly

Testing

  • npm run build --prefix packages/web/backend

https://chatgpt.com/codex/tasks/task_e_68fb826d35fc8328b282c8a1aea04b92

@rogeralsing
rogeralsing merged commit eb0daa0 into main Oct 24, 2025
1 check failed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines 270 to +279
}),
];

// 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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

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.

1 participant