Use Better Stack with Codex and ChatGPT
The Better Stack plugin puts our AI SRE in Codex and ChatGPT, with its skills and every Better Stack tool. It's free on every Better Stack plan.
Connect Codex to Better Stack
ChatGPT
- Open Plugins in the sidebar and find Better Stack.
- Click + to install it.
- Connect Better Stack when asked and sign in with your Better Stack account.
- Start a new chat.
Codex CLI
Add the Better Stack marketplace and install the plugin:
Sign in with your Better Stack account in the browser that opens, then start a new Codex session:
Know when to roll back a deploy
When your service gets a new error or incident, ChatGPT checks whether your latest deploy caused it and tells you in the chat whether to roll back. This check is powered by MCP Events: the Better Stack MCP server sends ChatGPT each new error and incident as it happens. It works in ChatGPT on the web, not in the Codex CLI.
- Connect Better Stack in ChatGPT.
- Start a new chat and paste this prompt, with your service filled in:
ChatGPT creates a task that runs on each new error or incident instead of on a schedule. Each run posts its verdict, such as "Roll back", with the evidence in the same chat.
Fix errors on a schedule with ChatGPT
Add a ChatGPT scheduled task that checks your errors in Better Stack every 4 hours and fixes the obvious ones with pull requests. It runs in the cloud, so it doesn't need ChatGPT open.
- Connect Better Stack in ChatGPT.
- Give ChatGPT's GitHub app, ChatGPT Codex Connector, read and write access to your repository's contents and pull requests.
- Switch to Work, start a new chat, and paste this prompt with your repository filled in:
ChatGPT checks it can open pull requests in your repository, creates the task, and lists it under Scheduled. To try it right away, click Run now. Pull requests are opened from your GitHub account, and nothing is merged until you review it.
Need help?
Please let us know at hello@betterstack.com.
We're happy to help! 🙏