Mastra Code
An open-source terminal coding agent with Build, Plan and Fast modes and explore, plan and execute subagents, whose observational memory compresses the session into notes instead of compacting it, so long sessions keep their context.
Find alternatives to Mastra Code
What it does
- Agentic coding
- Code generation
Features 7
- ModesSwitch between Build, Plan and Fast modes to match a workflow.
- GoalsKeeps working across turns until a judge model marks the objective complete or waits for input.
- Built-in ToolsTools for file viewing, editing, searching, shell commands and web search.
- Observational MemoryManages what to remember so context is not lost to token limits, avoiding compaction.
- Terminal NotificationsClickable notifications for Mastra Code running in an inactive terminal pane.
- Headless ModeRuns non-interactively from the shell or from Node and CI with the runMC API.
- CustomizationExtends the agent programmatically with custom modes, tools, subagents and storage.
Sources
- Pricing
-
The launch post calls it open-source; neither page names a price. Model use runs on the user's own provider keys.
- Description
-
Launch post of 2026-02-24: "An open-source TUI coding agent with observational memory that compresses context without losing it." The docs list Build, Plan and Fast modes and Explore, Plan and Execute subagents.
- What it does
- Sold within
-
Official documentation · 10 Oct 2026
Installed directly: "npm install -g mastracode".
- Name
-
Official documentation · 10 Oct 2026
"Mastra Code is a terminal-based AI coding agent that never compacts."
- URL
- Modalities
-
Official documentation · 12 Oct 2026
Page: 'Piped stdin is added after a plain-text prompt in the same first message / Show modified files or git diff'.
Also from Mastra
-
Mastra Developer tool
An open-source TypeScript framework that developers use to build, run and observe AI agents and workflows, with a hosted Studio and cloud deployment option.
-
Mastra Studio Developer tool
A shared workspace where a team inspects agent runs through traces and cost, latency and quality metrics, scores outputs with LLM-as-judge or code, runs dataset experiments and versions prompts and agent configurations, open to non-engineering reviewers without source access.
-
Mastra Platform Observability Infrastructure service
Hosted telemetry store for Mastra agents in production: it keeps the metrics, structured logs and step-by-step traces of model calls, tool calls and workflow steps for every run, with dashboards for cost, latency and quality scores.
-
Mastra Server Infrastructure service
Hosted deployment target that runs a Mastra application's agents, tools and workflows as an API server from one command, with routing and scaling handled by Mastra and billing by CPU time and data egress.
-
Mastra Gateway API service
An OpenAI- and Anthropic-compatible model gateway that routes one API key to 300+ models with provider failover, and adds observational memory that compresses each conversation into notes so agents keep context without rebuilding it.
-
Mastra Agent Builder Agent platform
A UI mounted inside a team's own Mastra server for creating and operating internal agents, with multi-tenant workflows, role-based access and channel integrations, licensed for production under Mastra's enterprise licence.
-
Mastra Factory AI agent
An open-source software delivery environment where coding agents take a connected repository's issues through investigation, planning, implementation and review to a reviewed pull request, with people deciding at each step; self-hosted or deployed on Mastra's platform.
Something wrong here? Send a correction — quote this product id: mastra-code.