Skip to content

hapi codex Web UI fails to inherit writable_roots from config.toml due to missing "custom" permission mode #512

@detecti1

Description

@detecti1

What version of HAPI is running?

hapi version: 0.16.7

What platform is your computer?

Darwin 25.4.0 arm64 arm

What issue are you seeing?

Description

When running the hapi codex command and interacting via the hapi Web UI, Codex appears to operate in a restricted "remote" mode. In this state, it ignores the writable_roots defined in the local .codex/config.toml file.

According to the https://developers.openai.com/codex/concepts/sandboxing, when using Codex through integrations (like the VS Code extension), the permission level must be explicitly set to "custom" to properly inherit local configuration. It seems that hapi currently lacks an option to toggle this permission setting, causing it to default to a more restrictive environment than the local terminal interface.

What steps can reproduce the bug?

  1. Ensure .codex/config.toml is properly configured with writable_roots and sandbox_mode settings.
  2. Start the codex using hapi codex.
  3. Open the hapi Web UI and send the following prompt:

    "Print the values of writable_roots and sandbox_mode from your current context."

  4. Open the local terminal (e.g., via double-tap space shortcut) and send the exact same prompt.
  5. Observe the discrepancy: The local terminal correctly reflects the values from config.toml, while the Web UI returns different (default/empty) results.

What is the expected behavior?

The Web UI should have an option to enable "custom" permissions, or it should automatically/configable to inherit the .codex/config.toml settings to ensure consistency with the local CLI environment.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions