Home / Blog / AI & LLM
AI & LLM วิเคราะห์จากสเปค + รีวิว

Analysis and Review: Codex Begins Encrypting Sub-Agent Prompts

A deep dive into Codex's new feature that encrypts prompts during communication with sub-agents to prevent data leakage during multi-agent operations.

Codex has started encrypting the prompts it sends to sub-agents to prevent data leakage during orchestration steps, especially when multiple agents are communicating with each other. Anyone running multi-agent workflows needs to check whether their existing logging or debugging tools can still read the prompts, since encryption may make tracing work harder. The thing to watch before rolling this out for real is backward compatibility with existing pipelines, and the latency impact of decryption between agent-to-agent calls.

Quick summary: This is a sign that AI agent tools are starting to prioritize security more heavily. But it remains to be seen how much implementation detail Codex will disclose before this gets adopted into real production workflows, since many multi-agent setups still rely on exposed prompts for debugging.

The screen you see in Codex has changed

Picture opening a terminal to watch Codex dispatch a sub-agent. Before, you’d see the full prompt streaming across the screen, readable enough to tell what the main agent was instructing and what data it was passing along.

Now that part has been replaced with unreadable text — like opening a log file and finding a long base64 string instead of a normal sentence.

It sounds minor, but it hits the workflow directly. Developers who used to tail logs to debug which agent went wrong now need a decryption step before they can read anything — which leads straight into the latency question discussed next.

When you can no longer see what sub-agents are saying to each other

Teams that have run multi-agent pipelines are used to opening a log and seeing every layer’s prompt in plain view. Want to debug which agent drifted out of scope? Just scroll and look — no extra steps needed.

Once Codex starts encrypting sub-agent prompts, what used to be easy to read becomes an encrypted string. Open the log and you immediately hit meaningless text.

The crux of this is a trade-off between security and observability — locking down prompts prevents internal instructions from leaking, but it also closes the window developers used to inspect agent behavior. Frankly, this is the point where teams have to choose: trust the system more, or build a new set of debugging tools to replace what was lost.

Where Codex sits in OpenAI’s coding-agent lineup

Codex isn’t just ChatGPT repurposed for writing code — it’s a separate agent tool that operates independently, taking a task and running through multiple rounds of writing, fixing, and executing code on its own without waiting for human input at every step. That’s different from ChatGPT, which is still turn-by-turn conversation.

Codex Web and the Codex API are also separate tracks — Web is geared toward solo use, while the API is the foundation enterprise teams build their own workflows on top of. This sub-agent prompt encryption feature is exactly what signals OpenAI pushing Codex further into the enterprise lane.

As agents start nesting multiple layers of sub-agents, the risk of prompt leaks or internal instructions escaping grows accordingly. Encryption is a signal that security is becoming a core selling point — not just speed or accuracy, which were the focus when Codex first launched.

What changes before vs. after encryption

Factor Before encryptionAfter encryption
Prompt visibility in logs Full plaintext visibleOnly ciphertext visible
Debugging sub-agents Open the log and read directlyNeed a key/permission to decrypt and view
Data security Risk of prompt exposure if logs leakLeaked log data is unusable
Tooling that reads prompt logs Works as normalMust be updated to support decryption first

You can see this is a trade-off between convenience and security. Developers who used to open logs and debug directly now have to go through a decryption layer first. Meanwhile, monitoring or audit tooling built to parse plaintext prompts will need to be updated to handle this new layer — or it breaks immediately.

Where this feature will show up in real work

First scenario: enterprise teams that have to pass compliance audits — logs that store prompts in encrypted form reduce the risk of customer data leaking when handed over to external auditors.

Second: developers debugging their own multi-agent pipelines. When one sub-agent calls another in a chain, scanning logs line by line changes — you’ll need to decrypt first to see what prompts were actually passed along.

Third: security teams worried about prompt injection leaking through logs — if an attacker sneaks a malicious instruction into context and the log is stored as plaintext on a central system, that’s an immediate vulnerability. Encryption closes this gap.

Fourth: CI/CD teams that keep automated logs for later inspection. Previously they might grep for errors directly; now the pipeline needs an added decryption step before parsing.

Comparing privacy stances with other players in the agent market

Compared with other agent tools, each vendor is taking a different path. Some still leave logs as plaintext to keep debugging easy; others, like Codex, have started encrypting by default.

Factor Codex (sub-agent)Typical competitors (Claude Code / Gemini CLI style)
How sub-agent prompts are stored Encrypted at restMostly still plaintext
Direct debug/grep on logs Requires decryption firstWorks immediately
Configurable encryption on/off Still limitedVaries by tool
Risk of prompt injection leaking via central logs ReducedStill present unless configured otherwise

This is clearly a trade-off between security and debugging convenience. Teams that still rely heavily on manual log inspection need to prepare to adjust their pipelines accordingly.

Pros and cons worth weighing

Pros

  • +Prevents data leakage from central logs — sub-agent prompts, which often contain business context or credentials, are no longer stored as plain text.
  • +Boosts confidence for enterprise teams that need to pass compliance requirements around customer data handling.
  • +Reduces the risk of prompt injection being intercepted mid-stream while agents communicate with each other.

Cons

  • Debugging immediately gets harder — open a log and it's unreadable; you must decrypt every time.
  • Pipeline transparency drops — when a sub-agent misbehaves, tracing the cause is harder than before.
  • Existing tooling that parses logs manually or via monitoring dashboards may break or stop working until updated.

In short: if your team already handles sensitive data, this feature is worth adjusting your pipeline for. But if speed of debugging is the priority, budget extra time for the transition period.

So who ends up paying the price of this privacy?

Security or compliance teams that used to audit logs directly now have to change their entire workflow — from reading prompts instantly to waiting for decryption or requesting extra permissions, which is undeniably slower.

Developers debugging sub-agents late at night who hit a strange error will be the first to feel the loss of visibility. What used to be as simple as opening a log now requires an extra step.

Organizations without a strong enough infra team to build new tooling for tracing issues will feel it the most, because the cost isn’t just time — it’s a temporary loss of their ability to monitor their own systems, until the surrounding ecosystem (dashboards, log parsers) catches up with this feature.

Put simply: the people who gain privacy and the people who pay for slower debugging may not be the same people.

A signal that the next generation of agents will be less transparent

Codex isn’t the first to take this path, but it’s a signal that agent tooling is shifting direction — from “show every step so it’s easy to debug” toward “seal the box and have the user trust the output instead.” It’s similar to how compilers gradually hid assembly code until newer generations of programmers never had to look at it at all.

If this trend spreads to other tools, dev teams should start preparing two things now, before it’s too late:

  • Separate the observability layer from the tool itself. Don’t rely solely on raw vendor logs — build your team’s own wrapper/metrics to capture input-output at the boundary level.
  • Set new security review standards for agents whose full process can’t be inspected — not just trusting the final output.

Less transparency isn’t inherently wrong, but the teams that prepare ahead of time will be the ones that survive when their own favorite tool seals its box too.