Skip navigation
🚨 Announcing a new coding agent that rivals Claude Code but with no compaction needed 🚨
0:00 / 4:34

🚨 Announcing a new coding agent that rivals Claude Code but with no compaction needed 🚨

Tyler Barnes

@tylbar1.9K followers

Visit on X
519 likesDownloadOriginal post

68,439 views

🚨 Announcing a new coding agent that rivals Claude Code but with no compaction needed 🚨 The feeling of using it: run your coding sessions forever, don't worry at all, and get shit done! We're calling it Mastra Code, it's powered by Mastra's new observational memory, and we've been using it internally Mastra to do all our work 1/4 🧵

76 Comments

Comments from the original post on X (Twitter)

  • Tyler Barnes's profile picture

    @tylbar

    I was a big time Claude Code user for a long time, but compaction was always this really broken/frustrating thing where after it happened it was better to just start a new session. We built Mastra Code to not have that problem. It uses observational memory and, instead of compaction, your session becomes dense observations that compress 6-40x in the background, all the context rot is dropped, and the history of what happened and what matters is retained

    19 likes

  • Tyler Barnes's profile picture

    @tylbar

    It's a full coding agent harness built on Mastra primitives: - 100% open source - 1,800+ models via Mastra's model router - Codex and Claude Max OAuth - Plan, build, and fast modes + subagents - LSP integration so it knows when it broke something - Tool permissions, YOLO mode, skills, shell tool, etc - Everything's local (stored in SQLite), nothing leaves your machine except LLM requests

    25 likes

  • Tyler Barnes's profile picture

    @tylbar

    Take it for a spin: npm install -g mastracode And check out for more info/docs Note you don't need to use Mastra to use Mastra Code, and it's a great way to try out observational memory if you've been curious about it!

    32 likes

  • Daniel Lew's profile picture

    @ShlomesLew

    @mastra once claude code introduced the skull and danger bar to show when compaction was coming i knew mastra code couldn't come soon enough

    14 likes

  • Tyler Barnes's profile picture

    @tylbar

    @mastra 100% 💀

    2 likes

  • Paul Scanlon's profile picture

    @PaulieScanlon

    @mastra icymi:

    12 likes

  • Digital Adam's profile picture

    @LondonDigiTech

    @mastra Also u buried in blogpost that it uses ast-grep rather than search replace which is probably as big of a deal as the no compaction promise. Ive been trying to get CC/Codex to use ast-grep consistently and they always suck at it so congrats if u pulled it off.

    11 likes

  • Tyler Barnes's profile picture

    @tylbar

    It actually uses both, we had search/replace first and added ast-grep later for more complex edits. We'll definitely be looking at removing search/replace eventually but haven't had enough time to validate yet. However I have definitely seen the agent reach for ast-grep a bunch of times successfully!

    5 likes

  • Digital Adam's profile picture

    @LondonDigiTech

    @mastra I'd heavily invest in ast-grep. In my experiments all SOTA models suck with it's syntax but when they finally get it working (after wasting a milion tokens learning it) it's like magic. Franky surprised big labs are sleeping on it.

    3 likes

  • Mudit Juneja's profile picture

    @being_mudit

    @tylbar @mastra But that learning is gone the next session no?

  • Digital Adam's profile picture

    @LondonDigiTech

    @tylbar @mastra In "classic" CC/Codex session pretty much yes. Using a skill (e.g. official one) helps things but in my observations agent still needs trial and error before tool error rate drops. Syntax seems just very alien to it, not in training set I bet.

    1 like

  • Shane Thomas's profile picture

    @smthomas3

    @mastra never fear compaction again...

    7 likes

  • Tyler Barnes's profile picture

    @tylbar

    @mastra feels so much better!

  • Cameron's profile picture

    @just_cameron

    @mastra Welcome

    4 likes

  • Digital Adam's profile picture

    @LondonDigiTech

    @mastra 1) what 2) cc has been driving me nuts with constant compaction circles recently so this looks exciting 3) will using Claude max oauth get my account banned, I think everyone is a little on edge nowadays about it

    2 likes

  • Tyler Barnes's profile picture

    @tylbar

    @mastra can't make any promises on 3 but i've been using mine without issue for a long time. i've been experimenting with codex in plan mode, glm-5 for execution incase anthropic blocks us and it's been working great that way

    1 like

  • Digital Adam's profile picture

    @LondonDigiTech

    @mastra damn, anthropic really needs to sort this. not gonna risk it but I'll give codex oauth a go. i cannot stress enough how much I've been driven mad by constant compaction with opus so really looking forward to check what I cooked up.

    3 likes

  • tz's profile picture

    @techczar00

    @mastra exactly what I've been looking for - will try this bad boy tonight

    2 likes

  • Tyler Barnes's profile picture

    @tylbar

    @mastra hell yea! let us know if you have any feedback or run into any issues, always happy to help

  • Chris's profile picture

    @chrisasstrophe

    @mastra @thdxr the memory part of this is open source, please explore for OpenCode 🙏

    2 likes