---
title: "Discussion on \"The agent renamed the environment variable in code, but CI still held the old secret name\" | Hashnode"
description: "Discussion on \"The agent renamed the environment variable in code, but CI still held the old secret name\". Renaming a token inside the repo does not rename the secret in CI. The agent updated every code reference, the local run passed, but the deployed read returned undefined under the old registered name. Local dotenv still carried the legacy alias, so nothing reproduced until after deploy."
url: "https://hashnode.com/posts/agent-renamed-env-var-code-ci-kept-old-secret-name/6ae23e646ab42a8ef9cb3c9d"
---

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

Discussion

# [The agent renamed the environment variable in code, but CI still held the old secret name](https://blogs.powerduck.com/agent-renamed-env-var-code-ci-kept-old-secret-name?utm_source=hashnode&utm_medium=feed)

Renaming a token inside the repo does not rename the secret in CI. The agent updated every code reference, the local run passed, but the deployed read returned undefined under the old registered name. Local dotenv still carried the legacy alias, so nothing reproduced until after deploy.

Oct 28 · 3 min read · blogs.powerduck.com  
Read the article

-   [#aiagents](https://hashnode.com/tag/aiagents)
-   [#configuration](https://hashnode.com/tag/configuration)
-   [#deployment](https://hashnode.com/tag/deployment)
-   [#secrets](https://hashnode.com/tag/secrets)

## Written by

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

@powerduck · hon

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
