I just used Codex to implement a new email triage system. It uses JMAP to access my Fastmail account using an API token, and automatically triages inbound emails into high, medium, or low priority levels, and archives the medium and low-priority emails. For high priority emails, it will also automatically use Codex to draft responses. It runs on my Linux server every 15 minutes, and everything is configurable.
I released the project, which is around 5000 lines of code in Python, as open source.
I find the following prompt useful for reviewing a large codebase:
I want you to sort of randomly explore the code files in this project, choosing code files to deeply investigate and understand and trace their functionality and execution flows through the related code files which they import or which they are imported by. Once you understand the purpose of the code in the larger context of the workflows, I want you to do a super careful, methodical, and critical check with “fresh eyes” to find any obvious bugs, problems, errors, issues, silly mistakes, etc. and then systematically and meticulously and intelligently correct them. Be sure to comply with ALL rules in
AGENTS.mdand ensure that any code you write or revise conforms to the best practice guides referenced in theAGENTS.mdfile.