Skip to content

Instantly share code, notes, and snippets.

View brennanmceachran's full-sized avatar
:shipit:

Brennan McEachran brennanmceachran

:shipit:
View GitHub Profile
@brennanmceachran
brennanmceachran / README.md
Created October 1, 2026 18:15
Mastra repro: Gemini MALFORMED_FUNCTION_CALL is not retried by the default StreamErrorRetryProcessor (@mastra/core 1.73.0)

Repro: Gemini MALFORMED_FUNCTION_CALL is not retried by Mastra's default error processors

npm install
npm run repro

Output with @mastra/core@1.73.0:

@brennanmceachran
brennanmceachran / README.md
Created September 25, 2026 18:10
Mastra DurableAgent idle-wake output contract reproduction (core 1.72.0-alpha.0)

DurableAgent idle wake returns a wrapper instead of the declared output

sendSignal(...).accepted declares a MastraModelOutput for an idle wake. The ordinary Agent returns that shape. DurableAgent instead returns a nested durable stream result. Consequently, await accepted.output.text evaluates to undefined, although the model completes and a thread subscriber receives the answer.

Run the isolated reproduction

Use Node.js 24 or later and npm. Copy this directory outside any application workspace, then run:

@brennanmceachran
brennanmceachran / README.md
Created September 17, 2026 03:11
Mastra native observer working-memory schema validation reproduction (no API keys)

Native observer working memory accepts values outside its configured schema

Mastra can manage working memory through its observer with a configured Zod schema. This reproduction shows that the native extractor persists values that violate that schema. It uses published packages, real in-memory libSQL storage, and scripted model responses. No API key, external database, application code, or paid model call is needed.

const schema = z.strictObject({
  preferredColor: z.enum(['blue', 'green']),
@brennanmceachran
brennanmceachran / README.md
Last active September 12, 2026 18:32
Mastra Factory 0.14.0: stock planning handoff bypasses human plan approval; offline reproduction and control

Factory planning can advance without human plan approval

Isolated component-integration reproduction for @mastra/factory@0.14.0, @mastra/code-sdk@1.7.1, and @mastra/core@1.66.0.

Expected: with Auto-approve plans OFF, asking Factory to start Planning should not also approve the plan the agent subsequently writes.

Actual: following the shipped factory-plan handoff instruction lets the agent move Planning -> Building (execute) and queue a build without a human approval

@brennanmceachran
brennanmceachran / README.md
Created September 12, 2026 14:43
Mastra DurableAgent: standalone interrupted-tool recovery and stale-worker history reproductions (pinned 86f3ccf)

DurableAgent: interrupted-tool recovery and stale-owner history writes

Standalone, synthetic public-API reproductions using PostgreSQL 17, Redis 7, official Mastra adapters, separate Node processes, and a deterministic AI SDK mock model. No provider keys, private repository, application env, or business logic is needed. Only the model is mocked; storage, leases, network partitions, process death, recovery, and shutdown are real.

Pinned target


name: final-shape-review description: Re-examine a nearly merge-ready implementation after review comments are addressed to ask whether the final data shapes, contracts, types, transitions, interfaces, ownership boundaries, and abstractions can be materially simplified before merge. Use when the code works and feedback is resolved, but the implementation may still carry discovery scars from trial and error and you want a bounded late-stage zoom-out pass that pushes the merged shape toward obvious, boring, future-maintainable code.

@brennanmceachran
brennanmceachran / full.json
Last active September 24, 2025 15:38
Field Notes Schema
{
"name": "field_notes_validated_array",
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
filepath AGENTS.md

AGENT Guidelines

  • Before making changes, read .instructions/general.instructions.md and any relevant instructions inside .instructions/apps or .instructions/packages for the files you plan to modify.
  • Keep TypeScript strictly typed. Do not use @ts-ignore or ESLint disable comments.
  • Always run pnpm typecheck to ensure your code is working. This also builds any needed deps. So do this anytime you cross a package boundary.
  • Use pnpm lint to check for linting errors and code style.
  • Use pnpm format -w to format all packages before committing.