ClawDOS – An AI coding agent for DOS

(ricapar.net)

172 points | by Ricapar 1 day ago

18 comments

  • linzhangrun 1 day ago
    Seriously speaking, I feel the market is sorely lacking an Agent for the large number of existing devices running WinXP, Win7, and the like. Not for developing on them, but for all kinds of debugging work it would be very useful; nowadays I'm used to just directing an Agent for everything.
    • egeozcan 1 day ago
      Couldn't agents just Remote Desktop or ssh into them?

      For seriously older stuff, I'd run the disk image in a VM.

      If they interact with legacy systems and/or virtualizing is no option and/or they have no internet access, a simple USB-to-COM adapter can create wonders. I remeber doing that on a win3.1 machine using TERMINAL.EXE many many years ago.

      • ulrikrasmussen 1 day ago
        In general, I've wondered whymost (all?) harnesses perform the API calls to the provider from the same machine that runs the tools. Why not have a client/server architecture? Then one session could talk to as many tool harnesses as it wanted to and you wouldn't have this kind of arbitrary limit of the session being tied to one specific workspace.
        • cykros 23 hours ago
          I regularly remote into my Hermes harness with a variety of means (Android client, Whitenoise, mostly). It's not that hard to then use sshfs to mount a shared filesystem in either direction. It's not THAT easy either because Google is draconian about Android but with root or just Graphene you've got generally what you're looking for (it may be possible without root but it's not nearly as smooth as it should be). The machine a system is on and the filesystem it is working on don't need to be one and the same, and the machine needn't even really know this.

          Is this not trivial with other harnesses or something?

        • dools 1 day ago
          My harness actually has 3 distinct components: the LLM gateway, the agent session manager, and the tool server, and they can be run on different machines. The most obvious use case is the LLM gateway being a central router for all provider queries with multiple machines running the agent sessions.

          The agent session manager talks to the LLM gateway over HTTP using a standard internal protocol, then the gateway has adapters for each upstream provider and translates between their external API format and the standard internal one.

          The tool server is a separate jar running as a separate server process with its own systemd unit and the agent session manager talks to the tool server over a beanstalkd queue. The primary motivation for having 2 processes was total separation for unprivileged agent tool call execution (ie. the tool server systemd unit runs as a user with no sudo whereas the agent session manager can execute as root, so the user can run scripts through the interface that do things like install packages and access secrets, but the agent can't do that.

          The tool server could just as easily be talking to beanstalkd over a Cloudflare tunnel or ssh port forward, though, and a session could be routed to different machines, allowing execution of tool calls in different environments within the same context window/agent session.

        • poxlr 10 hours ago
          [flagged]
        • zhengzefeng 1 day ago
          [flagged]
      • sixothree 1 day ago
        I had ChatGPT install NTFY over RDP. All I had to do was assign the DNS. So, yes. This is totally an option.

        The reason I had chatgpt install it wad because I could just tell these guys weren't Windows developers and I expected issues. And honestly, I wasn't in the mood for dealing with issues. I had other stuff to do. I probably should have had it submit bug reports because I could see it struggle with things it should not have encountered.

      • linzhangrun 1 day ago
        A typical scenario is that you walk into a small company and find they're still using Windows 7 or an early version of Windows 10. Then you have to help them deal with all sorts of problems.
    • xmeadow 1 day ago
      https://github.com/xmeadow/igor runs on react OS but was tested on XP and win7. Works flawlessly.
      • marttt 1 day ago
        Offtopic, but: do you daily-drive ReactOS? If so, care to share the experience -- any recurring hiccups, etc? Thanks.
      • keyle 1 day ago
        I wonder what kind of sandboxing you'd get on those machines though. Likely nought.
        • TeMPOraL 1 day ago
          Sandboxing would defeat the point of using agents on these machines, though.
    • fmxexpress 1 day ago
      My Free Pascal / Delphi agent compiles to a huge amount of platforms and no NodeJS required. I haven't tried targeting older platforms specifically but I do run it on Windows 10 and Windows Server 2019.

      https://github.com/FMXExpress/PasClaw/

    • kristopolous 1 day ago
      I've got an agent that just uses legacy perl 5.0001 ... close but there's no perl by default on windows (although it's easy enough to get on there)

      https://github.com/kristopolous/old-agent

      I've used it on plenty of old things.

      I'd probably do a pure .vbs version if it was windows or a static pure win32 exe.

      • networked 1 day ago
        Neat concept. I enjoyed the screenshots.

        I took the same path with my for-fun/learning GUI coding agent in Tcl/Tk: https://wiki.tcl-lang.org/page/Featherweight. It shells out to curl for the networking.

        I've just tried to get it to run on Windows XP SP3. (I have a VM for an old Canon all-in-one printer.) I grabbed a legacy Tcl 8.6.6 installer from https://github.com/dbohdan/tcl86-nsis-installer (mine) and a 2017 build of curl with certificates from https://winampplugins.co.uk/curl/. The harness was developed against curl 8 and didn't work with 7.53.1. MiMo-V2.6-Flash, running in the same harness on modern Linux with Wine for `curl.exe`, found that the necessary change was minimal and only touched `--write-out`:

          --- featherweight.tcl
          +++ featherweight.tcl
          @@ -2794,7 +2794,8 @@
                       --request POST \
                       --show-error \
                       --silent \
          -            --write-out "\n%{http_code} %{exitcode} %{errormsg}" \
          +            --write-out "\n%{http_code} 0" \
                       [dict get $config endpoint] \
        
        Here are two screenshots of the result. Featherweight is running in Tcl 8.6.6 on Windows XP.

        https://paste.dbohdan.com/1ng3b5y-kb4yd/greenshot-1.png https://paste.dbohdan.com/1ng3b5y-kb4yd/greenshot-2.png

        • anthk 1 day ago
          Instead of Curl get IronTCL and use http://legacyupdate.net to update the certs.
          • networked 1 day ago
            I need HTTP proxy support in Featherweight. I have found shelling out to curl easier and more reliable than a stack of `http`, `tls`, and `autoproxy`.
            • kristopolous 1 day ago
              Use the proxy from old agent, it doesn't care. It'll bridge http to https and even read modern webapps and convert them to markdown (via lightpanda). It has free web search (via keenable) as well with no API key. 1000 requests/day per ip
            • anthk 11 hours ago
              The updates from http://legacyupdate.net makes Windows XP TLS 1.2-functional. And IronTCL worked for a Gopher/Gemini client I've got from elsewhere (https://luxferre.top). It's called BFG, you can peek its source and find that everything works in the spot. No issues to connect to any Gemini server where TLS it's mandatory.

              I have some bundled BFG+IronTCL where it packs IronTCL, TCLlib and Tklib.

    • siraben 1 day ago
      I've been working on a coding agent called Psi[0] (port of Pi) that is written entirely in ANSI C and Lua, MIT licensed. Tested on Linux, macOS, Windows, Haiku, BSD. The first three being the same executable too running via cosmopolitan libc. Otherwise it just requires a POSIX environment.

      [0] https://psicode.ai/

    • linzhangrun 1 day ago
      Almost all agents require Windows 10 1809 or later. Debugging issues on older devices often turns out to be a real headache, and the only option is to get SSH working.
      • anthk 1 day ago
        There are Golang ports for WXP and up (check the Reticulum-go GH repo and the users), and there's MIn-C as a port of core OBSD tools for XP (Unix tools, compiler, vi, openssh and a bunch more).
      • shevy-java 1 day ago
        But should not AI be able to solve all these mentioned problems? Why can they not solve that?

        It would not make a whole lot of sense to me.

        • linzhangrun 1 day ago
          For old Windows, "setting up an SSH tunnel" itself takes quite a bit of fiddling. Especially when the device you need to deal with is on a distant external network, and you can't even remote in—you're limited to video calls and the like.
    • shevy-java 1 day ago
      Agreed. Kind of strange how AI promises everything but the old platforms are still ignored and neglected.
  • Tiberium 1 day ago
    It feels very cute and mischievous to start agents in unusual environments (DOS, Linux running on a feature phone, Windows 95, etc) and see how they react :)
    • unleaded 1 day ago
      Yep, I've made one in win32 earlier this month for that exact reason. It's always amusing seeing DeepSeek's CoT realise it's running inside NT 4.0 once it does a directory listing. It handles it pretty well too, I gave it a intentionally broad prompt to "write a 3d shooter game" pretty much, and it went and found the DirectX SDK that comes with VS6 and oneshotted it.
      • egeozcan 1 day ago
        DeepSeek is also wonderful for salvaging old phones for creating personal dashboard or silly handheld gaming machines.
    • xhevahir 1 day ago
      Put one inside Red Star OS and watch it take out the power grid!
  • jnpnj 1 day ago
    I wonder how far people could take DOS with today's knowledge.
    • qingcharles 23 hours ago
      There's been a lot of advancements in 40+ years. Especially things like graphics where several hacks have been found to vastly speed up writing to the display buffer etc.
    • bigfishrunning 1 day ago
      I feel like DOS isn't abstract enough for most of today's knowledge. Something something kids these days...
  • fsiefken 1 day ago
    I'd like a freepascal, zig or odin coding agent that can run natively on a pentium3 with 1G ram natively on either cpu or gpu - on dos, freebsd or linux at > 10 t/s. can this conceivably be done and how? Gemini says it can be done.

    I also think the ai compression algorithms focus on PPM, BWT or CM as these take less cpu and memory then Tr and LSTM https://mattmahoney.net/dc/text.html

    • anthk 1 day ago
      Solo-c running under an Atom netbook with 1.5GB of RAM (zram). Just use bubblewrap to sandbox it but better if you run it under another user under a TTY with no $DISPLAY exported at all.
  • hollowonepl 1 day ago
    Nice, is it claude only or could it also use codex?
  • jtxt 1 day ago
    Very cool. It would be interesting to see how far it can take demo scene type projects that stretch the hardware. See this project and prompt for ideas: https://github.com/Noniv/abyssal-garden. But the harness is competing for the same resources, so perhaps better from a distance/ to a vm?
  • sans_souse 1 day ago
    I love what I see!
  • Yashsarwaiya 1 day ago
    What stops it from running a delete you can't undo?
    • cykros 23 hours ago
      On its own system? Probably not much other than context directions.

      But I think the idea is run an agent on DOS and point it at filesystem that are elsewhere. Samba would work fine. And then your Samba server and filesystem permissions are what stops the remote agent.

  • paulimsouza 1 day ago
    this is amazing! my mind is blown by all the things that can come from this... and with this video resolution, Claude can practically read your screen in real time, crazy!
  • jaredsohn 1 day ago
    This can maybe optimize config.sys/autoexec.bat memory usage
  • ahofmann 1 day ago
    SCNR: Could someone please rewrite this in Go and call the result Gla(w)DOS?
    • SunlitCat 1 day ago
      It will surely be a huge success, note taking worthy (for the people, who are still alive, that is).
  • drob518 1 day ago
    Old and busted: Running Doom on every piece of old/tiny gear.

    New hotness: Running an AI agent on every piece of old/tiny gear.

  • fg137 1 day ago
    Does this prove that Claude Code doesn't have to be shipped as 200MB binaries?
  • netnchen 1 day ago
    I have to say this is really creative to try create a coding agent on DOS!
  • shashanoid 1 day ago
    Man the first thing that came to my mind was. From this stage if we ask AI to self build to current windows OS or Mac level. I can't help but put this fake scenario in my mind that imagine if we had this back in the day.
  • Othrya 1 day ago
    prob. many people dont even know what DOS is anymore :D
  • relistan 1 day ago
    This is great. Love to see people pushing the boundaries on vintage computers.
  • shevy-java 1 day ago
    Making DOS great again!

    Finally it can outperform TempleOS.

    Someone should rewrite the old Lemmings game with AI as well.

    • kyleee 1 day ago
      Is anyone carrying the torch forward on TempleOS now with AI?