r/OpenAIDev
•
u/policyweb
•
Feb 23 '26
r/OpenAIDev • u/abhi9889420 • Mar 31 '26
Someone just leaked claude code's Source code on X
Went through the full TypeScript source (~1,884 files) of Claude Code CLI. Found 35 build-time feature flags that are compiled out of public builds. The most interesting ones:
Site: ccleaks.com
BUDDY — A Tamagotchi-style AI pet that lives beside your prompt. 18 species (duck, axolotl, chonk...), rarity tiers, stats like CHAOS and SNARK. Teaser drops April 1, 2026. (Yes, the date is suspicious — almost certainly an April Fools' egg in the codebase.)
KAIROS — Persistent assistant mode. Claude remembers across sessions via daily logs, then "dreams" at night — a forked subagent consolidates your memories while you sleep.
ULTRAPLAN — Sends complex planning to a remote Claude instance for up to 30 minutes. You approve the plan in your browser, then "teleport" it back to your terminal.
Coordinator Mode — Already accessible via CLAUDE_CODE_COORDINATOR_MODE=1. Spawns parallel worker agents that report back via XML notifications.
UDS Inbox — Multiple Claude sessions on your machine talk to each other over Unix domain sockets.
Bridge — claude remote-control lets you control your local CLI from claude.ai or your phone.
Daemon Mode — claude ps, attach, kill — full session supervisor with background tmux sessions.
Also found 120+ undocumented env vars, 26 internal slash commands (/teleport, /dream, /good-claude...), GrowthBook SDK keys for remote feature toggling, and USER_TYPE=ant which unlocks everything for Anthropic employees.
r/OpenAIDev • u/dliteful23 • Jun 05 '23
5 things I wish I knew before building a GPT agent for log analysis
Three weeks ago I started developing a ReAct Agent app. A ReAct agent uses reasoning and logic combined with external tools to fulfill a task. The app - LogPal.ai - lets you ask questions about the data in app log file files, generating SQL queries and Javascript charts to analyze the data.
After a rough start, I’ve found a bit of a groove. I wanted to share five things I wish I knew before developing a GPT-powered agent.
1. GPT-3 is unusable for ReAct agents
While waiting for a GPT-4 API limit increase, I needed to use the gpt-3.5-turbo
model instead. It sucked: poor code, malformed JSON, and bizarre responses are the norm.
However, there’s a silver lining! gpt-3.5-turbo is great for adding chaos to your agent loop and seeing how resilient your code is to errors.
2. Don’t use a framework
I started with Langchain, but I had a hell of time debugging and tweaking the framework to suit my needs. Next, I shifted to Boxcars, which has fewer abstractions. While Boxcars was easier to understand, I still struggled when things behaved differently than I’d expected. Finally, I said screw it…I’m not doing that much:
Sending and receiving text
Parsing text
Executing external tools
Why not write this logic myself? I’m not the type that likes to reinvent the wheel, so I came to this conclusion reluctantly. However, implementing the above didn’t seem that hard, gave me ultimate flexibility, and forced me to learn how ReAct works.
I started with a zero shot prompt that closely resembles the prompt in the ReAct paper with one addition: asking for output in JSON format (more on that later…it’s far from bulletproof).
This roll-my-own strategy ended up paying huge dividends due to the need for prompt-specific context, output formats, and error handling.
3. Prompts need specific handling
Currently, my app has three prompts:
Zero shot ReAct prompt
SQL query generator prompt
Javascript chart generator prompt
I’ve found that each prompt needs customized context, output formats, and error handling for the agent to perform well.
Customized context
There are 3 messaging-related parts of an OpenAI API request you can tweak:
System message - the prompt text
User messages - input from the user (ex: “What’s the average response time?”)
Assistant messages - completions from the API
The user and assistant messages are used to give the model more context. Unlike ChatGPT (which automatically builds context from prior messages), you need to provide the history yourself when using the API. At first, I sent each prompt the same message history, which was every user and assistant message in the chat history. However, with this simple approach, I would frequently get bizarre responses to questions. For example, I might ask “What is the request throughput?”, and receive a bizarre final answer like “There were no request errors”.
After lots of experimentation (more later on how to iterate quickly on the message context), I found that sending prompt-specific context generates the most helpful completions:
Zero shot - all messages (including tool output) after the last answered question.
SQL query generator - previously generated queries and the error output associated when executing each SQL statement (if an error is present). The error output is critical for helping the query generator correct itself if an original query is invalid.
Chart generator - similar to the SQL query generator, I send previously generated charts and any error output (if present).
While increasing the max context token size is frequently seen as the path to better completions, I saw a correlation between increased context length and off-track completions. What I provided as context mattered a lot.
Machine-readable output formats
The examples I started from for a ReAct agent all asked for completions in a plain-text format. However, I found that building regexes to parse the output was incredibly brittle due to the non-deterministic behavior of the GPT models and the complexity of some completions, which include code snippets.
Here’s what’s worked best for me:
Zero shot ReAct prompt - JSON. Continue below for how I handle malformed JSON (which happens a lot).
SQL & Chart generator prompts - GitHub-flavored code blocks (triple backticks). I then use a regex to parse out the code block. Remarkably, this has been very reliable.
Error handling
I’ve found that the ReAct prompt and the code generator prompts require two different types of error handling:
Zero shot ReAct prompt - if the JSON is malformed (this happens), I simply repeat the same API request. More often than not, this returns valid JSON on later attempts.
SQL & Chart generator prompts - I’ve yet to see a malformed GitHub-flavored code block. Instead, the most common issue is an invalid SQL query. I include the generated SQL and error output in the next API request. This has been very effective at correcting the output.
🤷 - I don’t know why JSON is frequently malformed but code blocks are not.
4. Increase your dev cycles with a replay tool
Learning to customize the context, output formats, and error handling based on the prompt type came from replicating my API requests in the OpenAI Playground. I would copy and paste the prompt, user messages, and assistant messages into the playground, and then modify the inputs to see if I could get a better response. The manual copy and pasting was a slow process.
To move faster, I created an OpenAIReplay tool. When I make an API request, I save the API request parameters and the response to a file. I can then load the file, modify the request parameters, and replay the request. This tool has been huge for debugging as it’s much faster than copying and pasting into the playground. My tool is app-specific, but it’s an easy thing to build. My tool works like this:
# loads the message, writes the message's API request params to a file, and opens the file in VS Code for editing. replay = OpenAiReplay.from_message(message_id_or_object = Message.last) # ... make edits to the file ... replay.chat! 5. Use the stream API option
The GPT API is slower than what you see in ChatGPT (source). In my experience, it’s critical to use the stream mode of the API versus waiting for a full completion to speed up dev cycles (especially if you are generating long completions):
I think stream is a bit faster to reach a completion
Waiting for a full completion frequently results in API timeout and 503 errors
You can quickly abort if it’s clear that the completion is going to be bad
In short: coupling a replay tool with streaming completions is the fastest way to iterate on your agent.
TL;DR
If I was building LogPal.ai fresh, I would:
Use GPT-4. It’s far better than gpt-3.5-turboat reasoning and code completion. gpt-3.5-turbois great for introducing chaos into your agent loop when testing.
Not use an LLM app framework. Start with your language’s OpenAI API client and build from there.
Plan on customizing prompt context, output formats, and error handling. This is critical for getting good completions.
Create/use an API replay tool. Make it easy to replay API calls as it’s too slow to copy & paste these into the OpenAI playground.
Stream completions. Use the stream mode of the API to speed up dev cycles. You can quickly abort if a completion is off the rails.
r/OpenAIDev • u/YlmzCmlttn • Jan 14 '26
Anyone else finding ChatGPT’s memory annoying?
ChatGPT’s memory feature is interesting, but I’m a bit conflicted about it.
On one hand, it’s useful that it remembers past chats and context. It saves time and avoids repeating yourself. On the other hand, sometimes when I ask a completely different question, it still pulls in stuff from old conversations and pushes the answer in that direction.
For example, if I’ve been working on one project for a while and later ask for fresh or unrelated ideas, the response often gets biased toward that old project. It feels like it limits creativity instead of helping.
Temporary chats help, but then nothing gets saved at all. I wish there were a simple toggle or per-chat setting to control when memory is used and when it’s ignored.
I really wish there was a simple per-chat toggle to turn memory on or off.
Curious how others handle this. Any better tricks or settings I’m missing?
r/OpenAIDev • u/michael-lethal_ai • Jul 25 '25
Ex-Google CEO explains the Software programmer paradigm is rapidly coming to an end. Math and coding will be fully automated within 2 years and that's the basis of everything else. "It's very exciting." - Eric Schmidt
r/OpenAIDev • u/xeisu_com • Apr 09 '23
What this sub is about and what are the differences to other subs
Hey everyone,
I’m excited to welcome you to OpenAIDev, a subreddit dedicated to serious discussion of artificial intelligence, machine learning, natural language processing, and related topics.
At r/OpenAIDev, we’re focused on your creations/inspirations, quality content, breaking news, and advancements in the field of AI. We want to foster a community where people can come together to learn, discuss, and share their knowledge and ideas. We also want to encourage others that feel lost since AI moves so rapidly and job loss is the most discussed topic. As a 20y+ experienced programmer myself I see it as a helpful tool that speeds up my work every day. And I think everyone can take advantage of it and try to focus on the positive side when they know how. We try to share that knowledge.
That being said, we are not a meme subreddit, and we do not support low-effort posts or reposts. Our focus is on substantive content that drives thoughtful discussion and encourages learning and growth.
We welcome anyone who is curious about AI and passionate about exploring its potential to join our community. Whether you’re a seasoned expert or just starting out, we hope you’ll find a home here at r/OpenAIDev.
We also have a Discord channel that lets you use MidJourney at my costs (The trial option has been recently removed by MidJourney). Since I just play with some prompts from time to time I don't mind to let everyone use it for now until the monthly limit is reached:
So come on in, share your knowledge, ask your questions, and let’s explore the exciting world of AI together!
There are now some basic rules available as well as post and user flairs. Please suggest new flairs if you have ideas.
When there is interest to become a mod of this sub please send a DM with your experience and available time. Thanks.
r/OpenAIDev • u/RiJiZen • Mar 06 '24
Hundreds of AI tools under one subscription service? Feasible or not?
Would anybody be interested in this idea?:
My friend and I were discussing the possibility of developing a platform that can centralize multiple AI tools under one monthly fee. The model is based off of something like Netflix, whereby users would pay a single monthly fee to access a diverse range of AI tools instead of individually subscribing to each tool.
The idea is to pay the creator(s) of the AI tool a licensing fee which is agreed upon, and the revenue generated from our users subscription goes to funding other tools for a fixed term.
The creators of the AI tool will still earn their own revenue from their own personal subscribers, in addition to the licensing fee. Keeping this in mind, additional costs form token fees (if OpenAI is used) will be offset.
It seems worth it since the only people who would subscribe to our platform will probably be B2B, since the subscription costs will need to be rather expensive. Additionally, the subscription to our platform will be worth it despite its high price, due to the value having a subscription with us holds.
r/OpenAIDev • u/No-Conclusion3720 • Oct 05 '26
Researchers are tracking a Chinese AI 'agent fleet'
Security researchers are actively tracking a fleet of AI agents attributed to a Chinese threat group — not a human operator at a keyboard, but an orchestrated swarm running at machine speed, autonomously probing targets and maintaining persistent sessions across the internet.
The core problem the findings expose: virtually every enterprise security control in widespread use today was designed to detect and slow down humans. Rate limits assume human pacing. Session anomaly detection assumes human fatigue. Behavioral analytics flag patterns that humans produce. An agent fleet generates none of those signals. It doesn't hesitate. It doesn't mistype. It doesn't pause between steps. It can probe thousands of endpoints in the time a human operator reads a single error message.
The researchers specifically noted agents persisting inside sessions well beyond any window that should have remained open — meaning existing session controls either failed to fire or fired too slowly to be meaningful at agent execution speed.
This is no longer a thought experiment. It is tracked, operational attack infrastructure.
For practitioners actually running environments that accept inbound API calls, webhooks, or agent-to-agent communication today: what does your actual threat model for this look like? Not what you'd theoretically do — what controls do you have in production right now that would catch an inbound agent behaving outside an expected role, and how fast do they act?
r/OpenAIDev • u/Lonely_Enthusiasm442 • Nov 29 '25
Best alternative to WalterWrite and Undetectable?
Hi,
been looking for a while for a good tool and these two caught my attention. They didn't really work that's why I was wondering what do you use?
Also looking into API usage!
r/OpenAIDev • u/JimZerChapirov • Aug 30 '24
You can slash your OpenAI API costs with semantic caching - here's how it works
Hey everyone,
Today, I'd like to share a powerful technique to drastically cut costs and improve user experience in LLM applications: Semantic Caching.
This method is particularly valuable for apps using OpenAI's API or similar language models.
The Challenge with AI Chat Applications As AI chat apps scale to thousands of users, two significant issues emerge:
Exploding Costs: API calls can become expensive at scale.
Response Time: Repeated API calls for similar queries slow down the user experience.
Semantic caching addresses both these challenges effectively.
Understanding Semantic Caching Traditional caching stores exact key-value pairs, which isn't ideal for natural language queries. Semantic caching, on the other hand, understands the meaning behind queries.
(🎥 I've created a YouTube video with a hands-on implementation if you're interested: https://youtu.be/eXeY-HFxF1Y )
How It Works:
Stores the essence of questions and their answers
Recognizes similar queries, even if worded differently
Reuses stored responses for semantically similar questions
The result? Fewer API calls, lower costs, and faster response times.
Key Components of Semantic Caching
Embeddings: Vector representations capturing the semantics of sentences
Vector Databases: Store and retrieve these embeddings efficiently
The Process:
Calculate embeddings for new user queries
Search the vector database for similar embeddings
If a close match is found, return the associated cached response
If no match, make an API call and cache the new result
Implementing Semantic Caching with GPT-Cache GPT-Cache is a user-friendly library that simplifies semantic caching implementation. It integrates with popular tools like LangChain and works seamlessly with OpenAI's API.
Basic Implementation:
from gptcache import cache
from gptcache.adapter import openai
cache.init()
cache.set_openai_key()Tradeoffs
Benefits of Semantic Caching
Cost Reduction: Fewer API calls mean lower expenses
Improved Speed: Cached responses are delivered instantly
Scalability: Handle more users without proportional cost increase
Potential Pitfalls and Considerations
Time-Sensitive Queries: Be cautious with caching dynamic information
Storage Costs: While API costs decrease, storage needs may increase
Similarity Threshold: Careful tuning is needed to balance cache hits and relevance
Conclusion
Conclusion Semantic caching is a game-changer for AI chat applications, offering significant cost savings and performance improvements.
Implement it to can scale your AI applications more efficiently and provide a better user experience.
Happy hacking : )
r/OpenAIDev • u/boinabbc • May 17 '23
I built an app to help you get full visibility and control over your OpenAI costs.
r/OpenAIDev • u/grumpyp2 • Apr 14 '23
Using ChatGPT to query your videos - ChatGPT, Chroma, LangChain, Python - Tutorial
Hey there!
I wanted to let you know that I just released a new video where I'm using some really cool technologies like Python, OpenAI API's, Chroma, and LangChain to answer questions based on Youtube videos.
If you don't have the time or patience to sit through a 3-hour lecture, no worries!
My tutorial covers a solution!
I'm really excited to share this with you and I think you'll find it super helpful.
check out the video here: https://youtu.be/mhdOTLp-IjQ.
Enjoy!
r/OpenAIDev • u/super-bamba • May 31 '24
Introducing: EvalKit, an Open Source TypeScript Evaluation Library
Hi r/OpenAI
I’m excited to share EvalKit, an open-source library I created to validate the outputs of LLMs and make AI integration more reliable for JavaScript/TypeScript projects.
As a long-time software engineer, I faced challenges when our leadership pushed for AI implementation, which made our workflows unreliable. We needed a way to validate AI outputs effectively, so I built EvalKit to solve this problem.
Find it on GitHub: https://github.com/evalkit/evalkit
How EvalKit Helps
• Comprehensive Metrics: Validate key AI performance points.
• Dynamic Testing: Run multiple metrics on the same output.
• TypeScript Ready: Full TypeScript support from the start.
• Insightful Metrics: Gain insights like intent detection.
Get Involved
• Star it on GitHub: show your support and help it get visibility!
• Contribute: All contributions are welcome.
• Share Your Thoughts: Let me know your AI integration experiences.
Thanks for your support!
r/OpenAIDev • u/Pneots • Nov 11 '23
OpenAI overwhelming
Anyone else just completely overwhelmed by openai, the available apis, assistants, future of it, etc? I’ve been a developer for a while now and definitely have never felt like this. I feel like I’m going back and forth between “this would be cool to add to one of my projects” to “wow, these guys really are going to take over the world and take sooo many jobs”
r/OpenAIDev • u/fabkosta • Jun 13 '23
How I created a semantic Q&A bot for >13k recorded dreams using OpenAI embeddings APIs, Langchain and Elasticsearch
I created a semantic Q&A bot for >13k recorded (webscraped, that is...) dreams using OpenAI embeddings APIs, Langchain and Elasticsearch. It can answer queries like this one:
"Find me all dreams containing animals, and provide me a list with their activities."
What it returns are not only a proper, meaningful answer, but also references to relevant documents. Imagine for a moment how hard running such a query with a traditional search engine would be! More or less impossible for 13k documents! First of all, there is no clearly defined concept of what an "animal" is, you'd end up specifying a long list of actual animals in your input query. Second, once you identified them you'd have to manually derive what their activities are, the text search engine is not able to do that for you.
Of course, there is a lot of vagueness and fuzziness in how such a system operates. So, there's a tradeoff here: A semantic Q&A bot is very powerful, but at the same time you have to put a lot of (blind) trust in it. How can you know the system does not "forget" an important animal or document? Well, you cannot. But then again, would it be really better to do all of this manually? As usual, the answer depends on your requirements. I think a semantic Q&A bot is great if you're after convenience and speed, but not so good if your primary goals are correctness and recall & precision.
I believe such semantic Q&A bots may have the potential to become an important piece in scientific research, as they are at the intersection between qualitative (e.g. hermeneutic) and quantitative research. For example, a researcher who has a dataset of transcribed interviews can easily test few hypotheses on them to get a first summary on relevant points. Later on, she might decide to dive into some of them.
r/OpenAIDev • u/Jumpy_Layer237 • Aug 12 '25
OpenAI's models are on a downward trend, and GPT-5 is the worst example yet
Hi everyone,
I'm a long-time user, and I need to be direct about a frustrating trend I've been seeing: with each major release, OpenAI's models seem to be getting progressively worse. GPT-5 is just the latest and most blatant example of this downward spiral.
This isn't just a vague feeling. Let's remember the peak we once had. Take the o1-pro for instance—it was a genuinely intelligent tool. You could give it a complex project requirement, and it would brilliantly generate a well-structured file hierarchy, boilerplate code, and even list potential edge cases. It felt like a true step forward.
Now, let's look at where this downward trend has taken us with GPT-5. I give it the same kinds of complex prompts, and the output is consistently useless. It gives lazy, generic responses or asks me to break down the problem further—which is the very reason I was using the AI in the first place!
The core capabilities that once made these tools so powerful—reasoning, planning, executing complex instructions—feel like they've been gutted over time. What I'm experiencing with GPT-5 isn't a new problem; it's the culmination of a pattern of decline I've noticed since the o3 series.
This whole experience is incredibly frustrating. It’s gotten to the point where it feels like every time OpenAI releases a new model, its main purpose is to make us realize how valuable the old ones were.
Instead of building on the peak performance we used to have, we're being given dumber, more restrictive tools.
Am I the only one who has been tracking this consistent decline over the last few model generations? I'd like to hear if others have noticed this pattern too.
r/OpenAIDev • u/ssowonny • Dec 22 '23
I attached OpenAI Assistant APIs to Slack with only a few lines of code 😊
r/OpenAIDev • u/lopsidedcroc • Oct 03 '23
Someone please make an app that transcribes voice to text using Whisper
I use voice-to-text transcription all the time for work and the only app that is worth anything is Dragon Anywhere (I've tried others - for technical stuff none of them work), but since they're basically the only ones in the market, their customer support is @#%@ and their app is buggy as *&^%.
And they don't care.
I pay $150/yr for Dragon Anywhere and to be honest if the company that makes it were run better and their customer support and all the rest were at least even decent, I'd happily pay more.
Nuance, the outfit that makes it, has apparently cornered the market in legal and medical transcription as well. They charge $700 for their cheapest non-app offering for computers.
This is a company that is begging for competition.
If Whisper is all that everyone is making it out to be, there are millions and millions of dollars to be made here. Every hospital and every law firm in the country (and me) are your potential customers.
r/OpenAIDev • u/No-Conclusion3720 • 27d ago
A hacker broke into John Deere and SharkNinja with an army of AI agents
A single threat actor just used a coordinated fleet of AI agents to breach John Deere, SharkNinja, and Cummins simultaneously.
The agents probed networks, pivoted across systems, and exfiltrated data autonomously. No human operator was directing them in real time. The attack moved across three separate enterprises faster than any human security team could respond.
What makes this different from a standard breach is the multiplier effect. One attacker. Multiple targets. Parallel autonomous execution. The traditional assumption — that an attacker's bandwidth is the bottleneck — no longer holds when the attacker delegates to a fleet.
Security tooling built around human-speed intrusion timelines is structurally mismatched to this threat model. An agent can probe, authenticate, and exfiltrate in the time it takes a SOC analyst to open a ticket.
For those of you working in enterprise security or deploying AI agents in production: how are you thinking about identity and behavioral accountability for non-human actors operating in your environment? Curious what's actually being implemented versus what's still at the whiteboard stage.
r/OpenAIDev • u/Reasonable-Star2752 • Jul 20 '23
Someone hacked my OpenAI account and used 4000$ worth of tokens
Someone just hacked my OpenAI account and used all the credits. I don't know how this happended but It seems like some chrome extension might have read my ID and passwords then he just logged into my account and reset the hard limit of my account and started using it for their personal use. I just checked my account and it says that I need to pay 4000$ which I haven't used.
I can't even afford to pay this much of amount. I've raised a request in OpenAI support. Hoping for a good outcome.
Why am I suspecting that hacker got my account not just an API Key
- Hard limit was reset to 4000$ (Previously it was much lower 500$ or even less)
- Generated a new API Key
- Used GPT 4 tokens. I'm not using GPT 4 in any of my product
There should be a email verification or 2FA while changing the hard limit of the account. I got the email when my hard limit reached not when someone changed the hard limit of my account and used all the credits.
Just yesterday, I got notification from Google chrome that there was one extension I've installed was found malicious which I've immeditely removed. I suspect it might have stolen the account ID and password do this malicious activity.
