Skip to content

ivanopcode/devnote-codex-full_sandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Creating a codexmax Shortcut for Codex

This short note explains how to set up a convenient shell shortcut (codexmax) that launches Codex with full sandbox and network access, using your preferred options by default.

Motivation

Running Codex with a long list of flags is annoying to type and remember:

codex --search --sandbox=danger-full-access --ask-for-approval=never -c sandbox_workspace_write.network_access=true

Instead, you can create a shell alias (or function) so that:

  • You type a single word: codexmax
  • You always get the same “max power” Codex configuration
  • You can still pass additional arguments if needed

Core Alias

Add this line to your ~/.zshrc (or ~/.bashrc):

alias codexmax="codex --search --sandbox=danger-full-access --ask-for-approval=never -c sandbox_workspace_write.network_access=true"

Then reload your shell configuration:

source ~/.zshrc
# or
source ~/.bashrc

Now you can run:

codexmax

This expands to:

codex --search \
      --sandbox=danger-full-access \
      --ask-for-approval=never \
      -c sandbox_workspace_write.network_access=true

What these options do

  • --search → allow Codex to search the web.
  • --sandbox=danger-full-access → enable full sandbox access (powerful, but you must trust what you run).
  • --ask-for-approval=never → do not prompt for confirmation before executing actions.
  • -c sandbox_workspace_write.network_access=true → allow network access from the sandboxed workspace.

Function Variant (Forwarding Extra Args)

If you want to pass additional flags or prompts to Codex when calling codexmax, use a shell function instead of a plain alias:

codexmax() {
  codex \
    --search \
    --sandbox=danger-full-access \
    --ask-for-approval=never \
    -c sandbox_workspace_write.network_access=true \
    "$@"
}

Usage examples:

codexmax "Help me refactor this repository"
codexmax --model=latest "Design a CI pipeline"

The "$@" ensures all extra arguments are forwarded to Codex.

Usage Patterns

  • Direct invocation
codexmax
  • History search (zsh/bash)
    Use Ctrl+R, type codexmax, and hit Enter to quickly re-run your preferred Codex setup.

Notes & Safety

  • This setup skips approval prompts and grants broad access (including network + workspace writes).
  • Only use it in environments where you understand and trust what Codex is allowed to do.

About

A shell shortcut that launches Codex with full sandbox and network access

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published