Skip to content

"Automations" don't seem to properly respect the Rules #10625

Open

Description

@benglewis

What version of the Codex App are you using (From “About Codex” dialog)?

Version 260203.1501 (523)

What subscription do you have?

Business

What issue are you seeing?

Commands run via Automation locally are not properly evaluated against Rules, but instead are run in the sandbox and, as such, fail.

What steps can reproduce the bug?

When creating an Automation in the "Automations", and asking the Automation to run a command which is explicitly allowed in a Rule in the repository, it does not actually succeed in running the command (which requires network access), instead the command is run inside the sandbox (with no network access) and fails. The command I used was UV_CACHE_DIR=/tmp/uv-cache uv run pip-audit, but I believe that any command will reproduce the issue.

What is the expected behavior?

Just like in the Codex CLI, which works, the commands run should be checked against the Rules and if they are allowed under the rules, they should be allowed to run outside the sandbox.

Additional information

No response

Activity

  1. added
    app
    on Feb 4, 2026
  2. added
    bug
    sandbox
    on Feb 4, 2026
  3. github-actions commented on Feb 4, 2026

    @github-actions
    Contributor
  4. etraut-openai commented on Feb 4, 2026

    @etraut-openai
    Contributor

    Thanks for the bug report. Are you able to run the same command successfully in a normal thread in the app, a thread that's not started via an automation?

  5. benglewis commented on Feb 5, 2026

    @benglewis
    Author

    So interestingly, when I try to run it in a normal thread, I get prompted whether or not to approve network access (this despite the rule explicitly allowing running this command outside the sandbox). So I guess this is two bugs:

    1. The Codex application doesn't seem to respect Rules created in .codex/rules/my-thing.rules.
    2. The Codex application's "Automations" don't prompt for network access when a regular thread would.

    Does that make sense?

    Since there isn't anything particularly special / secret / interesting about my code here, I can share a snippet:

    My .codex/rules/pip-audit.rules file:

    prefix_rule(
        pattern = ["UV_CACHE_DIR=/tmp/uv-cache", "uv", "run", "pip-audit"],
        decision = "allow",
        justification = "pip-audit is allowed to run",
        match = [
            "'UV_CACHE_DIR=/tmp/uv-cache' uv run pip-audit",
        ],
        not_match = [
            "uv run abc",
            "uv run pip-audit",
            "uvx pip-audit",
        ],
    )
    

    My prompt:

    Run `UV_CACHE_DIR=/tmp/uv-cache uv run pip-audit`
    If there are vulnerabilities, please fix them.
    If there aren't, exit and note that
    

    Other than having a venv created with uv and having pip-audit installed in that venv, I don't think that there is anything specific to our codebase, but since that codebase is open source anyway, here is the branch I was testing this from: https://github.com/Hirundo-io/hirundo-python-sdk/tree/sdk-87-allow-codex-to-run-pip-audit-and-fix-vulnerabilities

    Weirdly, I just upgraded to Codex CLI version 0.96.0 and it also doesn't seem to run the command automatically, but prompts for whether to allow network access... so maybe something changed that affects both Codex app and Codex CLI recently?

  6. radvansky-tomas commented on Feb 24, 2026

    @radvansky-tomas

    same issue here...automation dont have network/fetch access...but moment you continue conversation it works

  7. stephengilroy-grx commented on Feb 25, 2026

    @stephengilroy-grx

    Also seeing this issue. @etraut-openai do you need more info on this to debug this?

  8. benglewis commented on Mar 5, 2026

    @benglewis
    Author

    @etraut-openai Is it worth trying to ask Codex to debug this issue in the Codex App and fix it? :P
    If so, I'd happy to give it a try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugsandbox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions