# Codex scheme for operations requiring secret access after "setup" runs

**URL:** <https://community.openai.com/t/codex-scheme-for-operations-requiring-secret-access-after-setup-runs/1315896>\
**Category:** Codex\
**Tags:** codex, feature-request, safety\
**Created:** [July 14, 2025, 7:32pm UTC](https://community.openai.com/t/codex-scheme-for-operations-requiring-secret-access-after-setup-runs/1315896 "2025-07-14T19:32:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jefflaporte](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/jefflaporte/32/151643_2.png) [@jefflaporte](https://community.openai.com/u/jefflaporte)\
**Post date:** [July 14, 2025, 7:32pm UTC](https://community.openai.com/t/codex-scheme-for-operations-requiring-secret-access-after-setup-runs/1315896/1 "2025-07-14T19:32:30Z")

</div>

The issue of no safe way to make use of secret-using operations post-setup is an almost immediate blocker to serious use of Codex when there are dependencies on private package registries or other private git repos, etc.

A couple other topics have also touched on the issue of the need for “secret-using” operations to be performed by the agent after setup (refs below).

I think there’s a fairly simple scheme to address the most common cases.

Usually, we just want the agent to be able to update dependencies or perform other read-only operations requiring secrets. Adding the ability to:  
(a) Define a sandboxed dependency install script (with secret access) just like the setup script, that could be called by the agent, or  
(b) Allow the definition of a sandboxed wrapper script for any named executable that can handle secret passing like the setup script does

The truth is, every shell command is a sandboxed tool call anyway, so the mechanism already exists to catch each shell invocation. The change in (a) is to grant access to a new parameterless script, or (b) to hook every run of a particular cli command for handling by a user script.

## Other topic refs

- [Codex best practices for persistent secrets](https://community.openai.com/t/codex-best-practices-for-persistent-secrets/1286607)
- [How can I persist GH\_TOKEN for Github CLI with Codex?](https://community.openai.com/t/how-can-i-persist-gh-token-for-github-cli-with-codex/1293472)

---

<div class="post-metadata">

**Author:** ![simone.m.romeo](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@simone.m.romeo](https://community.openai.com/u/simone.m.romeo)\
**Post date:** [May 20, 2026, 2:06am UTC](https://community.openai.com/t/codex-scheme-for-operations-requiring-secret-access-after-setup-runs/1315896/2 "2026-05-20T02:06:10Z")

</div>

Useful framing. I’d split “secret-using operations” into at least two shapes:

1. setup/CLI secrets that a sandboxed wrapper can use
2. browser/login secrets where the agent should never receive the value at all

I’m building AgentPass Local for the second case: local OS-protected credentials, allowed domains as the policy boundary, browser-field fill, and outcome-only handoff back to the agent. Same underlying need: the agent gets permission to complete the work, not general visibility into the secret.

---

<div class="post-metadata">

**Author:** ![Mark\_G](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@Mark\_G](https://community.openai.com/u/Mark_G)\
**Post date:** [May 28, 2026, 10:18pm UTC](https://community.openai.com/t/codex-scheme-for-operations-requiring-secret-access-after-setup-runs/1315896/3 "2026-05-28T22:18:09Z")

</div>

Closed on May 28, 2026, 10:18pm UTC


