Skip to content

Conversation

AjayKumbham
Copy link

Summary

  • Align system instructions with actual runtime context by relying on the initial environment_context for network_access, rather than assuming defaults.

What

  • Update codex-rs/core/prompt.md to:
    • Direct the agent to use environment_context.network_access and sandbox_mode to reason about capabilities.
    • Avoid language that speculates about network availability when network_access is enabled.
    • Fall back to defaults only if environment_context is missing.

Why

  • Fixes incorrect reasoning where the agent stated “Since the repository might not have network access…” despite user config enabling network access (network_access = true).
  • Resolves issue #3136 by ensuring messaging matches the configured sandbox policy and network settings communicated via environment_context.

How

  • Documentation-only change to codex-rs/core/prompt.md. No runtime logic modified.
  • The core already emits an initial environment_context message including network_access; this change instructs the model to respect it.

Impact

  • User-facing reasoning and messages are now consistent with the configured network access.
  • No functional behavior changes to tools, sandboxing, or execution paths.

Testing

  • No code changes; no unit tests updated.
  • Verified docs compile and style remains consistent.
  • Manual validation: with network_access = true under workspace-write, the agent’s guidance should reflect that outbound network is available.

Files Changed

  • codex-rs/core/prompt.md

Related Issues

  • Fixes #3136.

Checklist

  • Focused, minimal change
  • Matches TUI and style guidelines
  • No unrelated refactors
  • References linked issue
  • No new lints or formatting deviations

Copy link

github-actions bot commented Sep 4, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@AjayKumbham
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant