Skip to content

fix: restore connected-app execution - #281

Merged
iamjr15 merged 1 commit into
mainfrom
fix/composio-tool-call-context
Aug 13, 2026
Merged

fix: restore connected-app execution#281
iamjr15 merged 1 commit into
mainfrom
fix/composio-tool-call-context

Conversation

@iamjr15

@iamjr15 iamjr15 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • restores connected-app actions that failed before reaching Composio
  • binds the durable tool-call identity into Mastra request context
  • preserves idempotent quota charging across Workflow retries and every connected toolkit

Root cause

Cloudflare Workflow checkpoints each model-selected tool call, but Mastra's execution wrapper does not preserve arbitrary top-level compatibility fields. The Composio quota event builder read toolCallId from that wrapper, so every action threw before the provider request.

Architecture

The durable executor is the authoritative boundary that owns the checkpointed call identity. It now writes that identity into the request-scoped Mastra context before tool execution. Composio reads the same validated context used for its credentials and account routing, then derives the stable quota event key.

Decisions made

Decision Choice Alternatives considered Reasoning
Tool identity transport Explicit request-context value Model arguments; Mastra compatibility fields Keeps internal idempotency data out of prompts and uses the context contract Mastra preserves
Fix scope Shared durable executor Gmail-specific bypass Covers Gmail, Notion, and every connected toolkit/model without special cases
Quota behavior Retain deterministic tool-call idempotency Disable quota metering Workflow retries must not double-charge connected-app usage

Verification

  • pnpm lint
  • pnpm typecheck
  • pnpm turbo build --force
  • pnpm deadcode
  • pnpm architecture:check
  • pnpm turbo skills:build
  • production diagnosis: account ownership and OAuth active; direct provider execution succeeds
  • production Workflow trace: exact pre-provider failure reproduced as Composio execution requires a bounded tool-call id.

Production acceptance after merge

  • ordinary-language Gmail read returns the requested messages
  • explicit @Gmail read succeeds
  • ordinary-language Notion read succeeds
  • explicit @Notion read succeeds
  • bare @ lists active connected apps
  • browser console remains free of new application errors

Persist the durable tool-call ID in Mastra request context.
Connected-app execution now derives a stable quota key from a field Mastra preserves.
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
cheatcode Skipped Skipped Aug 13, 2026 12:23pm

@iamjr15
iamjr15 merged commit 67708ec into main Aug 13, 2026
6 checks passed
@iamjr15
iamjr15 deleted the fix/composio-tool-call-context branch August 13, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant