What problem does it solve? Large Bash and MCP tool outputs in Codex CLI consume excessive context tokens, degrading agent performance and inflating costs. This Skill installs a hook that intercepts oversized outputs, saves them to disk, and returns a compact summary plus chunk index instead of raw text, cutting token usage by roughly 70-80%. ## Core Features & Use Cases - PostToolUse Hook Installation: Configures ~/.codex/hooks.json and config.toml so Codex CLI intercepts Bash and mcp__* tool results automatically. - Local Semantic Indexing: Uses a local qwen3.5:4b model via Ollama to generate summaries and chunk tables without sending data to external services. - Fail-Open Design: Any error (Ollama down, model missing, timeout) causes the hook to exit cleanly so the original output passes through unchanged. - Use Case: A developer running find or log-analysis commands that produce thousands of lines gets a short summary with chunk references, then retrieves only the relevant line ranges with sed -n instead of flooding the context window. ## Quick Start Ask the agent to install the context-index hook for Codex CLI, including Ollama setup, the qwen3.5:4b model, hook scripts, and hooks.json configuration.