Gaurav retweeted
"Member of Technical Staff" level interview question:
An AI agent calls an external API and times out.
You don't know whether the API executed the action.
Should the agent retry?
How would you make the operation safe?
Replying to @Leapofcode
everyone shouting 'idempotency keys' is failing the actual MTS interview question—you specifically asked what happens when the external API DOES NOT support idempotency
the 3 distributed systems patterns for surviving agent timeouts against non-idempotent legacy APIs:
1. the fundamental rule: timeout is an unknown in-flight state:
a timeout is the Two Generals' problem: the TCP packet could have failed on ingress, OR the bank/vendor executed the mutation and only the response dropped
if an agent blindly retries a non-idempotent POST, you guarantee duplicate side effects (double charges, duplicate records)
the state machine must transition to IN_DOUBT, never straight to RETRY
2. deterministic read-before-retry (synthetic idempotency probes):
even if the vendor has no Idempotency-Key header, their payload usually accepts custom metadata or reference fields
embed a deterministic token into the request: reference = hash(agent_id, task_id, step_nonce)
on timeout, the agent NEVER retries the POST directly—it issues an out-of-band probe:
GET /transactions?reference=REF_42
- if the record exists: adopt the remote ID, mark succeeded, proceed
- if 404 after an established quiet window: only then is it safe to retry
3. the Saga pattern & asynchronous reconciliation queues:
if the vendor has neither idempotency nor deterministic reference queries, synchronous resolution is mathematically impossible
the agent must persist the intent to a dead-letter / reconciliation outbox and yield
an out-of-band worker attempts reconciliation or issues a compensating reversal (void / cancel) before unlocking the agent's workflow
the true MTS architecture answer: never let agents call raw un-idempotent third-party APIs directly. you place an internal egress proxy in front that shims synthetic idempotency and transaction locks
Gaurav retweeted
I don't understand why OpenAI investing in computer-use models?
What are some real-world use cases for computer use beyond the browser?
Gaurav retweeted
If your secret keys get exposed on GitHub through a .env file, is rotating them enough?
Asking for a friend.
Gaurav retweeted
maybe a dumb question...
why no comparison with Gemini 4 Argon?
Introducing Kimi K3.1 Pro: our most capable 3T-class open-weight model.
🔹 1M-token context, 2.8T total / 104B active params (MoE), Multimodal.
🔹 Full-project coding: games in Unreal, Unity & Godot.
🔹 Excels at parametric 3D modeling in Blender & CAD.
🔹 More reliable at finance work: Accurate modeling with hallucination down by 65%.
🔹 Matching the strongest proprietary models across coding, agentic and knowledge benchmarks.
Kimi K3.1 Pro and K3.1 Pro Highspeed (2–3× faster) are now live on Kimi.ai, Kimi Work, Kimi Code, and the Kimi API.
Open weights by Nov 4, 2026.
🔗 API: platform.kimi.ai
🔗 Tech blog: kimi.ai/blog/kimi-k3-1-pro
Gaurav retweeted
What's the best place to store an authentication token in a web app?
A) localStorage
B) HTTP-only cookies
C) IndexedDB
D) It depends
Which would you choose, and why?
Gaurav retweeted
Junior React developer interview question:
Your React app is open in multiple browser tabs.
A user logs out from one tab.
How would you synchronize the authentication state across all other tabs instantly, without refreshing the page?
Gaurav retweeted
Day 9/60 of AI agent problems nobody warns you about.
You told your agent: "Never email customers."
200 messages later, its memory filled up. The oldest ones got dropped, and that rule went with them.
No error. It just forgot.
What does your agent forget first? 👇













