Version: 1.2 Date: February 12, 2026 Status: Active — governing all architectural decisions Audience: Architecture review boards, engineering leadership, development team
| """Utilities for dynamic token management with OpenAI Responses API and tiktoken. | |
| This module counts tokens, trims/summarizes history to fit a context window, | |
| and computes a safe max_output_tokens honoring application and provider caps. | |
| It also reserves optional reasoning headroom for thinking models. | |
| """ | |
| # pip install openai tiktoken | |
| import os | |
| from typing import List, Dict, Any, Optional, Tuple | |
| import tiktoken |
You propose establishing a dedicated internal GitHub repository to share AGENTS.md files and related documentation for using OpenAI’s Codex CLI within the company. The goal is to standardize how developers leverage Codex by providing:
- Global Agents workflows: e.g. a two-stage “plan then implement” agent setup.
- Project-level Agents.md templates: standardized formats for common project types (Python/FastAPI services, Terraform IaC, front-end UI projects, AWS Lambdas, etc.).
- Usage documentation: a guide on installing and using Codex CLI (with company-specific tips).
- Integration ideas: potential future integrations (e.g. Slack bots, CI/CD automation) to extend Codex’s usefulness.
- Repository Scope: This will be an internal GitHub repo (accessible only within the company). We don’t have an existing repo for this, so we’ll create it from scratch. Keeping it internal avoids any confi
AGENTS.md has emerged as the de facto open standard for guiding AI coding assistants, now adopted by over 20,000 repositories and formalized in August 2025 through collaboration between OpenAI, Google, Cursor, Factory, and Sourcegraph. This file acts as a "README for machines"—providing structured, technical context that helps AI assistants write better code from the start. For Python + AWS + Terraform projects, a well-crafted AGENTS.md dramatically reduces friction, ensuring generated code follows your conventions, uses the right tools, and adheres to security requirements.
AGENTS.md is a dedicated Markdown file that complements, not replaces, README.md. While README targets human developers with project overviews and quick-start guides, AGENTS.md contains detailed technical instructions specifically for AI coding agents. Think of it as onboarding documentation for an AI team member: ex