Skip to content

Codex CLI fails with 'Not inside a trusted directory' error #3

Description

@alfonsodg

Problem

Codex CLI execution fails with error: Not inside a trusted directory and --skip-git-repo-check was not specified

Root Cause

Codex CLI has security restrictions that prevent execution outside trusted directories. The current implementation in codex_subagent() doesn't handle this.

Solution

Add --skip-git-repo-check flag to Codex CLI commands in cli_subagent.py:

command = f'codex exec --skip-git-repo-check "{instruction}"'

Affected Code

  • roundtable_mcp_server/cli_subagent.py - codex_subagent() function
  • Line ~100-150 where Codex CLI command is constructed

Testing

  1. Run codex_subagent() with a simple instruction
  2. Verify it executes without trusted directory error
  3. Ensure project_path is properly handled when provided

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions