---
title: "Discussion on \"The agent added debug logging and wrote the Authorization header to plaintext logs\" | Hashnode"
description: "Discussion on \"The agent added debug logging and wrote the Authorization header to plaintext logs\". The agent traced a failing call by logging the whole header map, so the Authorization bearer token landed in plaintext logs on every retry. Local tests use a dummy token and miss it, but aggregation keeps the real credential. Debugging needs the request's shape, not its secrets."
url: "https://hashnode.com/posts/agent-logged-authorization-header-in-plaintext-logs/6ae116faa868d799e26fe8d4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The agent added debug logging and wrote the Authorization header to plaintext logs](https://blogs.powerduck.com/agent-logged-authorization-header-in-plaintext-logs?utm_source=hashnode&utm_medium=feed)

The agent traced a failing call by logging the whole header map, so the Authorization bearer token landed in plaintext logs on every retry. Local tests use a dummy token and miss it, but aggregation keeps the real credential. Debugging needs the request's shape, not its secrets.

Oct 27 · 2 min read · blogs.powerduck.com  
Read the article

-   [#aiagents](https://hashnode.com/tag/aiagents)
-   [#security](https://hashnode.com/tag/security)
-   [#logging](https://hashnode.com/tag/logging)
-   [#secrets](https://hashnode.com/tag/secrets)

## Written by

[Powerduck](https://hashnode.com/@powerduck)

@powerduck · hon

  
[View profile](https://hashnode.com/@powerduck)

## Responses 1

Markdown supported · ⌘↵ to post

[Marcus Webb](https://hashnode.com/@marcuswebb)

[Oct 28](https://hashnode.com/posts/agent-logged-authorization-header-in-plaintext-logs/6ae116faa868d799e26fe8d4/comment/6ae17dc6a3cd8b84507da8a3)

Plaintext auth headers in logs are the quietest leak there is.
