35 comments

[ 0.22 ms ] story [ 24.2 ms ] thread
Hi HN, I built ThoughtDAG around one rule: wires are the context.

Each question and answer is a node. When you ask from a node, only its wired upstream nodes are included in the model request. Delete an edge, regenerate, and that branch leaves the model's actual context, not just the visualization.

The interface is intentionally human-controlled. I'm testing whether explicit context control is useful for long-running research, or whether most people would rather delegate memory selection to retrieval.

It is MIT licensed, local-first, supports Ollama and OpenAI-compatible endpoints, and includes PDF clipping with page provenance.

GitHub: https://github.com/chenxiachan/thoughtdag

I'd especially appreciate criticism of the interaction model and onboarding.

What about cache? When you change the context the prefill stage will be much slower?
This looks like git, doesn't it?
The basic idea here looks interesting and is easy to understand but what I'm not understanding is why it's a standalone app. Is this supposed to replace e.g. Claude desktop? Or can it plug in to other systems like Claude Code, Codex, Pi?

I don't think I'd want to use it as a standalone app but I would certainly be interested in it as a plugin.

Thank you for your feedback!

Just want to know. What would be the smallest useful integration for you: allowing the host tool to read the currently selected context, or bidirectional access so it can also create, branch, and prune nodes?

(comment deleted)
This seems like a really interesting idea and something I've basically been doing myself manually so far, with a DESIGN.md document with "one concept/decision per line, built in a tree" basically, where all decisions that needs to be remembered gets noted down for future reference.

Not a fan of ThoughtDAG being a complete separate application rather than built into the tools I use every day, like my text editor or other planning tool. But neat that you've seemingly integrated a bunch of LLM providers, including letting us use local models, sufficiently sweet :)

Some security "nitpicks": I'm fairly sure you have a critical security issue in the "execSync(`pdftoppm -png -r ${dpi} ...`)" call you do, which I don't think would have been a issue if the local web server you start listened to 127.0.0.1 or some other local IP, but instead it seems the server binds to 0.0.0.0, meaning all network interfaces. Put together, anyone who runs this application effectively gives anyone else a free shell to your computer :)

Tiny nitpicks about the AppImage specifically, seems it's missing publisher details/signing (not a huge deal, just something you might want to look into) and also it's using "--no-sandbox", don't think you need that, let it be sandboxed instead, and the remote vulnerability above might also become less of an issue :)

I'll hold off a bit to play around with it, because of the issue above, but I'm curious to see if it does provide something more than what I manage with my ASCII Markdown tree of decisions. Maybe there is potential for ThoughtDAG in the future to be better integrated with other tools, and end up mostly being the management/viewer of things, so I can continue using vim and codex as today, but they can read/write via ThoughtDAG perhaps, or some other approach.

Regardless, thanks for sharing it and good luck! :)

Irrespective of opinions about a project or its authors, disclosing a potential security issue in a public forum is markedly not responsible disclosure.
Can this integrate with replit?
nice. i was going to develop something like this for my own learning pattern

https://news.ycombinator.com/item?id=49263169

I read the discussion you linked. The Transformer and MLP examples you gave illustrate the learning process I hope ThoughtDAG can handle: entering a branch along a question without disrupting the main thread; understanding it before deciding which content to bring back, rather than letting the entire exploration automatically pollute the subsequent context.

If you'd like to try it, I'd love to know if it matches your original vision of the learning method, and where it might still interrupt the process. If convenient, please share a screenshot of the anonymized canvas, an anonymous export, or a short screen recording. Seeing a real learning process would be very helpful for improving ThoughtDAG.

I looked at the repo and demo canvas. Nice work. Especially liked the 3 semantic zoom tiers and the weave/condense features. If you're enabling for less-technical users consider leading with weave and condense vs. edge deletion. Edge deletion is where the model is powerful but my Mom would get stuck there for instance. The idea that removing a wire changes what the model actually sees might not be obvious.

Consider when someone clicks a node, show a sidebar listing (node references)with remove buttons to reframe as 'what does this answer know about me" vs. "edit of the graph".

Love the graph for power users but listing can be the explanation layer.

(comment deleted)
Sometimes I ask the agent why it gave a certain answer, when I feel it overly fixated on something. It would be cool if the ui hilighted the poisonous part of the conversation somehow.
[flagged]
This concept is interesting, and I could see the value. But, I downloaded it to try it, and the interface is janky. The concept is interesting but the UI/UX is bad and confusing. For example, I can't pan the canvas. And the conversation on the right-hand side doesn't show all the previous messages that are getting included in the context window.
Nice work! Recently I prototyped a harness for structured agentic research work and I arrived at something very similar.

I found it especially useful for balancing research breadth vs research width when exploring new topics. A graph structure makes it easier for me to identify potential blind spots in the research process and allows me to be more confident that no promising alternative solutions were left out while at the same time not getting too stuck in rabbit holes of subquestions.

When I built my prototype I had this image of a physarum slime mold [0] in my head that branches off into all directions first, then reinforces potential paths while starving off all other branches. In the end that path that survives is the result.

[0] https://carolinalombardi.com/physarum-polycephalum

I've been working on something similar to this using Neo4j so you can control the context with a Cypher query because I really like Cypher. But this visualization is excellent.
Have we all been vibing around the same idea? There are already arxiv papers in the same vein. Very excited to watch this space
I 'v been work on similar project last months, I guess the new attention direction will be on Co-memory contexts instead of making the models have more context memory but hallucinating more
Really nice project, i like some of the functionalities you have though of. When thinking of new concepts i sometimes use similar tool which i created https://github.com/Srakai/bushchat, its browser based (in my opinion more convenience). I kind of switched to .md file knowledge base now so i don't use it very often anymore.

For me the most interesting idea around branching is tree rebuilding itself up when source node is modified. For example, if you are drafting a new project and one assumption changes, all subsequent nodes that based on that knowledge get rebuilt.