Skip to content

fix: retain original agent keys in remapAgentKeysToDisplayNames#1924

Open
Wongbuer wants to merge 1 commit intocode-yeongyu:devfrom
Wongbuer:fix/retain-original-agent-keys
Open

fix: retain original agent keys in remapAgentKeysToDisplayNames#1924
Wongbuer wants to merge 1 commit intocode-yeongyu:devfrom
Wongbuer:fix/retain-original-agent-keys

Conversation

@Wongbuer
Copy link

@Wongbuer Wongbuer commented Feb 17, 2026

Summary

  • Fixes remapAgentKeysToDisplayNames() dropping original agent keys, which causes upstream opencode's Agent.get() to return undefinedTypeError: undefined is not an object (evaluating 'agent.name')
  • Both display name and original key are now preserved in the agent map

Fixes #1922


Summary by cubic

Preserves original agent keys when remapping to display names so Agent.get() can look up by the original key without crashing. The agent map now contains both the display name and original key for each known agent.

Written for commit 9965549. Summary will update on new commits.

remapAgentKeysToDisplayNames was dropping original keys (e.g. 'prometheus')
and only keeping display names (e.g. 'Prometheus (Plan Builder)').
Upstream opencode's Agent.get() does a direct dict lookup by original key,
causing undefined → TypeError crash.

Now both display name and original key are preserved.

Fixes code-yeongyu#1922
@github-actions
Copy link
Contributor

Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement (CLA).

To sign the CLA, please comment on this PR with:

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

This is a one-time requirement. Once signed, all your future contributions will be automatically accepted.


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


Wongbuer seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Changes only add preservation of original keys alongside display names, no regression risk detected by review.

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.

remapAgentKeysToDisplayNames drops original agent keys, causing Agent.get() to return undefined

1 participant

Comments