---
title: "Sohail Khan (@msohailkhandev) | Hashnode"
description: "Full Stack Engineer & Tech Lead | Flutter · Next.js · Node.js | AI Agents, RAG & LLM Integration. Read the latest articles by Sohail Khan on Hashnode."
url: "https://hashnode.com/@msohailkhandev"
---

@msohailkhandev

# Sohail Khan

@msohailkhandev · Islamabad, Pakistan · Joined October 2026

Full Stack Engineer & Tech Lead | Flutter · Next.js · Node.js | AI Agents, RAG & LLM Integration

[Website](https://www.linkedin.com/in/msohailkhandev)

### [Your Agent Should Not Trust Its Own Tool Input.](https://msohailkhandev.hashnode.dev/your-agent-should-not-trust-its-own-tool-input?utm_source=hashnode&utm_medium=feed)

Your agent should not trust its own tool input. An agent I wired up called createOrder with whatever the model produced. Most days the input was fine. One day the model sent an order where one item ha

7 min read · [msohailkhandev.hashnode.dev](https://msohailkhandev.hashnode.dev/your-agent-should-not-trust-its-own-tool-input?utm_source=hashnode&utm_medium=feed)

[3d ago](https://hashnode.com/posts/your-agent-should-not-trust-its-own-tool-input/6af80dc700c857a5bae3fca9)

### [Your Flutter Screen Fetches on Every Build. It Should Fetch Once.](https://msohailkhandev.hashnode.dev/your-flutter-screen-fetches-on-every-build-it-should-fetch-once?utm_source=hashnode&utm_medium=feed)

Your Flutter screen fetches on every build. It should fetch once. A screen I reviewed called the API inside build. Every rebuild fired the request again, so a keyboard opening, a theme change, or any

6 min read · [msohailkhandev.hashnode.dev](https://msohailkhandev.hashnode.dev/your-flutter-screen-fetches-on-every-build-it-should-fetch-once?utm_source=hashnode&utm_medium=feed)

[5d ago](https://hashnode.com/posts/your-flutter-screen-fetches-on-every-build-it-should-fetch-once/6af559043610263904e062bd)

### [Your API Does Not Need More Logs. It Needs One Error Shape.](https://msohailkhandev.hashnode.dev/your-api-does-not-need-more-logs-it-needs-one-error-shape?utm_source=hashnode&utm_medium=feed)

Your API does not need more logs. It needs one error shape. A client I worked with kept breaking every time an endpoint failed. One error came back as plain text, the next as an HTML page, the next as

4 min read · [msohailkhandev.hashnode.dev](https://msohailkhandev.hashnode.dev/your-api-does-not-need-more-logs-it-needs-one-error-shape?utm_source=hashnode&utm_medium=feed)

[Nov 10](https://hashnode.com/posts/your-api-does-not-need-more-logs-it-needs-one-error-shape/6af2f01eaf8577ecd8257580)

### [Your Flutter App Is Not Slow. It Is Loading Full Size Images Into Tiny Boxes.](https://msohailkhandev.hashnode.dev/your-flutter-app-is-not-slow-it-is-loading-full-size-images-into-tiny-boxes?utm_source=hashnode&utm_medium=feed)

A product list I reviewed scrolled badly on older phones. Every card showed a small thumbnail, but the app downloaded the full size photo for every item, held it in memory, and resized it on the fly.

5 min read · [msohailkhandev.hashnode.dev](https://msohailkhandev.hashnode.dev/your-flutter-app-is-not-slow-it-is-loading-full-size-images-into-tiny-boxes?utm_source=hashnode&utm_medium=feed)

[Nov 5](https://hashnode.com/posts/your-flutter-app-is-not-slow-it-is-loading-full-size-images-into-tiny-boxes/6aec2b0e8ae466d7555b3585)

### [I Reject More PRs for Boring Mistakes Than for Clever Bugs](https://msohailkhandev.hashnode.dev/i-reject-more-prs-for-boring-mistakes-than-for-clever-bugs?utm_source=hashnode&utm_medium=feed)

I reject more PRs for boring mistakes than for clever bugs. I lead a team of Flutter developers and I review PRs every day. Here is the uncomfortable truth I keep coming back to: the bugs that reach p

9 min read · [msohailkhandev.hashnode.dev](https://msohailkhandev.hashnode.dev/i-reject-more-prs-for-boring-mistakes-than-for-clever-bugs?utm_source=hashnode&utm_medium=feed)

[Oct 31](https://hashnode.com/posts/i-reject-more-prs-for-boring-mistakes-than-for-clever-bugs/6ae58639f9bd1287277f9909)
