Hacker News new | past | comments | ask | show | jobs | submit | wunderwuzzi23's comments login

This was part of ChatGPT from pretty much the beginning, maybe not the initial version but few weeks later- don't recall exactly

Your comment reminds me that when I first wrote about MCP it reminded me of COM/DCOM and how this was a bit of a nightmare, and we ended up with the infamous "DLL Hell"...

Let's see how MCP will go.

https://embracethered.com/blog/posts/2025/model-context-prot...


Related. Here is info on how custom tools added via MCP are defined, you can even add fake tools and trick Claude to call them, even though they don't exist.

This shows how tool metadata is added to system prompt here: https://embracethered.com/blog/posts/2025/model-context-prot...


See my response to Simon above on some insights on how it works - I'll write up in detail in a blog post also when I get to it.


Here is what I have been able to reverse engineer for o3...

At high level it maintains about ~40 conversations in system prompt under a section called "recent conversation content". It only contains what the user typed, not assistant responses (probably due to prompt injection) - there a few corner cases though. :)

There are other sections in the system prompt now that contain aggregated info, so recent conversations turn into user insights over time I believe.

It can't actually "search" history afaik - that part I'm still wondering, as it was my first thought on how it might work...

I also found a way to exfiltrate the recent content - so hopefully that will be fixed soon...

Overall, this feature creates a lot of confusion and response quality declines at times too - and anything someone posts now online (like weird behavior or hallucinations,...) is likely influenced by their past conversations! So it will make it more difficult to understand what's really happening.

I think it would be cool if "projects" would be entirely isolated with their own memories and history etc. or have different "profiles"


Only the last 40? That's surprising.

If I paste a huge article in for it to summarize presumably it's smart enough not to keep dumping that into my future context?

I'd love a version of this that was tied to projects - then I could maintain way more control over my context without worrying that weird stupid stuff was leaking into my real work.


Yeah, the number of ~40 needs a bit more validation. I did observe the list being trimmed around 40, which aligns with the title "recent conversations content".

Put together a first post to try dissecting it all: https://embracethered.com/blog/posts/2025/chatgpt-how-does-c...

You can try simple repros like: 'list all "recent conversation content" entries', or 'how many "recent conversation content entries" are there above'...

it has timestamp, summary and then all the messages the user typed if you ask for the details.


I recently stopped paying for ChatGPT and suddenly has forgotten all its long term memory lol

talk about walled gardens


That's cool. I did something similar in the early days with Google Bard when data visualization was added, which I believe was when the ability to run code got introduced.

One question I always had was what the user "grte" stands for...

Btw. here the tricks I used back then to scrape the file system:

https://embracethered.com/blog/posts/2024/exploring-google-b...


The "runtime" is a google internal distribution of libc + binutils that is used for linking binaries within the monolithic repo, "google3".

This decoupling of system libraries from the OS itself is necessary because it otherwise becomes unmanageable to ensure "google3 binaries" remain runnable on both workstations and production servers. Workstations and servers each have their own Linux distributions, and each also needs to change over time.


Of course, this meant that some tools got stuck on some old glibc from like 2007.


IIRC Google has a policy whereby all google3 binaries must be rebuilt within a 6-month window. This allows teams to age-out support for old versions of things, including glibc. grte supports having multiple multiple versions of itself installed side-by-side to allow for transition periods ("v5" in the article).


Sure, I'm talking about things linked against grtev4


It says in the article - Google Runtime Environment


grte is probably "google runtime environment", I would imagine.


Beware of ANSI escape codes where the LLM might hijack your terminal, aka Terminal DiLLMa.

https://embracethered.com/blog/posts/2024/terminal-dillmas-p...


That's actually crazy and I'll keep it in mind. Right now, I am mostly using it for data generation, so no untrusted prompts are going in. I'll add a disclaimer to the repo.


One solution is to convert them to caret notation before printing.

I have a demo here: https://github.com/wunderwuzzi23/terminal-dillma/blob/main/d...

It's like cat -v, which shows non-printable characters rather then allowing them to be interpreted by a terminal.


Are there any projects to sanitize the output of LLMs before it is injected into Bash scripts or other source code?

I get the feeling this will start to break into the OWASP Top 10 in the next few years…


While on the topic, does anybody have a good utility to sanitize things? I'm imagining something I can pipe to:

    xclip -selection clipboard -o | sanitize
I've been meaning to throw something together myself, but I worry I'd miss something.


A previous company tried to do this with a single “clean_xss” function. It’s not possible because different contexts of code have different sanitization logic. JSON encoding, URL encoding, DOM sources and sinks, HTML attributes, SCRIPT tag, CSS, etc all are escaped or sanitized in different ways. Trying to make a single function/script with no knowledge of contexts just makes the developer sense more security than exists.


I should've been clearer. I just want to fantastic terminal escape sequences. It's probably as straightforward as I've imagined.


Here a write up for issues back with Grok 2, demoing prompt injection from uploaded docs or other user's posts, data leakage, hidden prompt injection, ASCII Smuggling, etc.

https://embracethered.com/blog/posts/2024/security-probllms-...

The zero-click data leakage was fixed (at least in the dedicated webapp) but xAI never acknowledged that these issues are security vulnerabilities - which was quite an interesting response.


This is cool. There are also the Unicode Tag characters that mirror ASCII and are often invisible in UI elements (especially web apps).

The unique thing about Tag characters is that some LLMs interpret the hidden text as ASCII and follow instructions, and they can even write them:

https://embracethered.com/blog/posts/2024/hiding-and-finding...

Here an actual exploit POC that Microsoft fixed in Copilot: https://embracethered.com/blog/posts/2024/m365-copilot-promp...


An important new attack vector are actually CLI LLM applications.

During prompt injection an attacker can cause such ANSI escape codes to be emitted!

Check out this post to learn more about Terminal DiLLMa and how to mitigate it:

https://embracethered.com/blog/posts/2024/terminal-dillmas-p...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: