Skip to content

fix(agent): recover turns through unified provider control - #275

Merged
leoisadev1 merged 7 commits into
mainfrom
audit-mastra-provider-issues
Sep 16, 2026
Merged

leoisadev1 merged 7 commits into
mainfrom
audit-mastra-provider-issues

Conversation

@leoisadev1

Copy link
Copy Markdown
Member

Problem

Akeru split provider execution between its Mastra controller and legacy paths, which made tool approvals, MCP access, credentials, and runtime behavior depend on the selected provider. A server restart could also leave an active chat interrupted with no reliable continuation path.

Fix

  • Route Codex, Claude, Grok, Kimi For Coding, and OpenCode Go through the Akeru Mastra controller while retaining standard OpenCode as the explicit SDK compatibility path.
  • Resolve model credentials and base URLs from the exact provider instance, without leaking provider-wide or ambient credentials into isolated instances.
  • Automatically reconcile interrupted turns after restart, expire stale approval and input requests, and expose a durable Resume action in web and mobile when automatic recovery cannot finish.
  • Strengthen the Akeru harness instructions and tool selection around proactive execution, verification, approvals, MCP access, and safe user-visible failure handling.

Closes #266.

Verification

  • 251 focused orchestration, recovery, harness, client command, and web UI tests passed.
  • 13 focused provider driver and routing tests passed.
  • Restart/replay tests passed five consecutive runs before final packaging.
  • Server, web, and mobile typechecks passed.
  • An isolated browser session accepted Resume, retried the turn, reconnected through a forced server-update restart, and preserved the recoverable chat state.

Native mobile interaction was not run because this host has no enabled simulator or ADB installation. Paid-provider sessions were not invoked; their construction, routing, and controller integration are covered by focused tests.

Created with GPT-5.6 Sol in T3 Code.

@github-actions github-actions Bot added type:provider Agent provider contribution. area:connectors Plugin and MCP connector runtime. size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Sep 15, 2026
@greptile-apps

greptile-apps Bot commented Sep 15, 2026

Copy link
Copy Markdown

Greptile Summary

  • Unifies supported provider execution through the Akeru controller with instance-scoped credential resolution.
  • Restores pending starts and resumable interrupted work after server restarts, while expiring stale approval and input requests.
  • Adds shared Resume commands and recovery controls across web and mobile clients.

Confidence Score: 5/5

Safe to merge; no outstanding issues require action.

The duplicate manual-resume dispatch issue was manually resolved without explanation by leoisadev1. The ambient provider credential readiness issue was manually resolved without explanation by leoisadev1. The inline OpenCode Go credential resolution issue was manually resolved without explanation by leoisadev1. The committed-resume restart recovery issue was manually resolved without explanation by leoisadev1. The startup and live-stream duplicate resume dispatch issue was manually resolved without explanation by leoisadev1.

Reviews (4): Last reviewed commit: "fix(server): deduplicate resumed turns" | Re-trigger Greptile

Comment thread apps/server/src/orchestration/decider.ts
Comment thread apps/server/src/provider/Layers/AgentController.ts
Comment thread apps/server/src/provider/AkeruMastraHarness.ts
@github-actions github-actions Bot added size:XXL and removed size:XL labels Sep 15, 2026
Comment thread apps/server/src/orchestration/projector.ts
Comment thread apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
@leoisadev1
leoisadev1 merged commit 554c9c4 into main Sep 16, 2026
9 checks passed
@leoisadev1
leoisadev1 deleted the audit-mastra-provider-issues branch September 16, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:connectors Plugin and MCP connector runtime. size:XXL type:provider Agent provider contribution. vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Akeru feedback] terminal commands are not working it seems - I can't seem to allow them...we don't have always a

1 participant