Codex Power Tips: 5 Essential Slash Commands That Turn a Beginner Into a Full-Stack Teammate

Published on: 2026-07-26

Codex Power Tips: 5 Essential Slash Commands That Turn a Beginner Into a Full-Stack Teammate

๐Ÿ“– Glossary

AI Box (also known as Agent Computer / Agent PC), is a dedicated local hardware device that runs AI Agents. Pre-installed with an AI agent management system, plug-and-play, running 24/7. Users can remotely command AI to work via Discord, Slack, Telegram, WhatsApp, and more.

Abstract: Most people install Codex and never go beyond "write me a function." The real power lies in a handful of slash commands. Master these five, and your AI coding buddy transforms from a glorified autocomplete into a full-stack development partner. Each command explained with real scenarios you can use today.


AI coding tools are everywhere in 2026, but OpenAI's Codex stands apart thanks to its deep integration with GPT models. Yet most users barely scratch the surface โ€” typing "codex -p write me a script" and calling it a day. That's like driving a Ferrari to the corner store.

What turns Codex from a code typewriter into a full-stack development teammate is a set of slash commands hidden inside the interactive dialogue interface. They're not complicated, but once mastered, your development efficiency jumps from a 10% boost to a 10x multiplier. Even non-coders โ€” project managers, product leads โ€” can use these commands to actively participate in the development process.

And when you deploy Codex on a Kaihe AIBOX โ€” a local agent computer that runs 24/7 โ€” these commands become exponentially more powerful, because your development partner keeps working while you sleep.


1. Five Core Slash Commands

Open a terminal, type codex to enter interactive mode, and type /? anytime to see the full command list. But in daily use, these five are the ones that matter.


/agents โ€” View current model capabilities and available agent list

This should be the first command you type after entering Codex. It shows which models are mounted in the current session, what each model excels at, and their memory footprint.

Practical uses fall into two layers: - Check your environment: If you're writing Python but Codex is defaulting to a model optimized for conversation rather than code, /agents catches that immediately - Switch models: Once you know which model you want, /model gpt-5-code switches in one line. Don't waste time on a suboptimal model

For users who have installed third-party agents like Hermes on their AI boxes, /agents can also show local agent lists. The local Hermes handles intent understanding, while the cloud GPT generates code โ€” each doing what it does best.


/init โ€” Initialize project context memory

This command's power is severely underestimated. It auto-scans the current directory and generates an AGENTS.md file that captures the project structure, language stack, and dependencies โ€” effectively giving the AI a "reference manual" of your codebase.

Example: You inherit a 5,000-line Python backend using Flask, with routes scattered across five files and three YAML config files. Without /init, every request you make to Codex requires it to "guess" what you're working on from scratch. After running /init, Codex automatically understands: Flask project, routes are here, configs are there, ORM is SQLAlchemy. Now when you say "modify the registration endpoint logic," it knows exactly where to go.

This matters even more when switching between projects. Project A uses React + Node.js, Project B uses Django + PostgreSQL. Without re-running /init, Codex will still reason with Project A's context โ€” every change will be off-target.


/memory โ€” Read and write persistent memory

This is Codex's killer feature introduced in 2026. Regular AI conversations are ephemeral โ€” you spent 20 minutes yesterday explaining internal business rules to Codex, and today you start a new session having to explain everything again. /memory fixes that.

/memory save lets you persist key knowledge from the current conversation โ€” for instance, "company order status flow: pending โ†’ confirmed โ†’ processing โ†’ shipped โ†’ delivered." Next time in a new session, /memory recall and Codex instantly has that context, picking up right where you left off.

The advanced play is building knowledge templates: - #project:payment-rules stores payment system security rules - #project:style-guide stores team coding conventions - #persona:backend stores "you are a backend expert prioritizing code maintainability"

These templates make Codex's effectiveness grow exponentially with usage time, rather than resetting to zero every session. This is precisely why running Codex on a Kaihe AIBOX for extended periods matters โ€” your AI teammate works here continuously for months or years, accumulating increasingly precise memory that never gets lost.


/compact โ€” Compress conversation history to free context space

The silent killer of long coding sessions is the context window. After two hours and eight modified files, the token window nears capacity. Output slows, quality degrades, and the AI starts "forgetting" requirements stated at the beginning.

/compact compresses the full conversation history into a structured summary โ€” preserving key decisions ("user decided to use SQLite instead of PostgreSQL") and current state snapshots ("currently modifying the authentication module") while trimming repetitive trial-and-error exchanges. After compression, context usage typically drops from 70-90% to 20-30%, and you continue with an AI that's as clear-headed as when you started.

Practical rhythm: Run /compact roughly every hour of work โ€” just as programmers take a water break periodically, it's healthy coding discipline.


/init โ†’ /memory โ†’ /agents: The three-step "full-stack ritual"

If your Codex opening routine looks like this: 1. /agents โ€” quick check that the environment and model are correct 2. /memory recall #current-project โ€” load previously saved project memory 3. /init โ€” refresh current directory structure

These three commands take under 30 seconds combined, but every subsequent interaction for the rest of the day builds on a "fully informed" AI foundation. The time saved is measured in hours.


2. An Evolving Teammate Matters More Than a Smarter Model

Look back at these five commands โ€” /agents, /init, /memory, /compact, and their combinations โ€” and notice their common thread: they don't change what the AI model can do. They help the AI better understand you.

An AI teammate that "knows you" versus a smarter "stranger AI" โ€” the efficiency gap isn't percentage points, it's orders of magnitude.

So if you're still deliberating over "which model is better at coding," consider shifting your attention โ€” nail the fundamentals of initialization, memory, and context management first. Model capability improvements are the vendors' job. Making your AI partner increasingly understand you โ€” that's entirely within your control.

And this mechanism is perfectly suited for running Codex long-term on a Kaihe AIBOX: the box stays on 24/7, sessions don't get closed, memory keeps accumulating, and code keeps progressing. Waking up to check the test report Codex ran overnight โ€” that feeling is more real than any benchmark score improvement.


3. Further Reading


Learn more, search for "Kaihe AIBOX" | Email: [email protected]

KaiheAIBOX #Codex #AIAgent #OpenAI #DeveloperTools #AIAssistant


Kaihe AIBOX ยท Your Private AI Assistant Working 7ร—24 ยท AI Agent

Recommended Products

A1 Home Entry A1 Pro Enhanced A2 Professional A2 Pro Advanced X1 Enterprise G1 Flagship
ยฉ KAIHE AI - Agent Computer Specialist