---
title: "Discussion on \"The Agent Added an Await to a Synchronous Function. The Caller Didn't Notice.\" | Hashnode"
description: "Discussion on \"The Agent Added an Await to a Synchronous Function. The Caller Didn't Notice.\". An agent 'modernized' a sync function by marking it async. TypeScript was happy. The production caller that destructured the return value synchronously started crashing at runtime."
url: "https://hashnode.com/posts/agent-adds-unnecessary-await-breaks-sync-caller/6ad2b3689da64d85e06c3f7c"
---

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

Discussion

# [The Agent Added an Await to a Synchronous Function. The Caller Didn't Notice.](https://blogs.powerduck.com/agent-adds-unnecessary-await-breaks-sync-caller?utm_source=hashnode&utm_medium=feed)

An agent 'modernized' a sync function by marking it async. TypeScript was happy. The production caller that destructured the return value synchronously started crashing at runtime.

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

-   [#aiagents](https://hashnode.com/tag/aiagents)
-   [#coding](https://hashnode.com/tag/coding)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#refactoring](https://hashnode.com/tag/refactoring)

## Written by

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

@powerduck · hon

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
