Skip to content

Collaboration routines: cap mail in agent context, report timeouts, keep skills across pod rollouts - #3253

Merged
ryanweiler92 merged 1 commit into
devfrom
collaboration-updates-11-03-2026
Nov 3, 2026
Merged

ryanweiler92 merged 1 commit into
devfrom
collaboration-updates-11-03-2026

Conversation

@ryanweiler92

Copy link
Copy Markdown
Collaborator

Problem

Custom routines on the deployed instance were cancelled at the 10-minute agent limit, and the owner got nothing. Two causes:

  1. Too much mail in the model's context. The routine agent reads mail with ListM365Mail, which returns up to 100 messages per call, each with a body of up to 10,000 characters by default (the model can ask for more). Reading the inbox and the sent folder filled most of Laguna's 250K-token window. The harness only prunes once the window is nearly full, so every turn still sent about 200K tokens. Each turn took 1-2 minutes, and the run hit the cap.
  2. Skills missing after a rollout. On a new pod, LoadSkill failed with SkillStager: skill '...' has no skill content folder. A skill project is pushed to cloud storage once, when it is created, before SKILL.md is written, and never again. A new pod pulls that empty copy.

A timed-out run also showed "Check your Microsoft connection and Collaboration model" in Routines, and no email or Teams message reached the owner.

Changes

Cap mail per tool call (CollaborationToolResults)

  • Each ListM365Mail result shares one 30,000-character body budget across its messages: 50 messages get 600 characters each, 5 get 6,000. When bodies are cut, a note tells the model to list fewer messages or read one thread with conversationId.
  • This only changes what collaboration agents see. The mail reactor and its other callers are unchanged.

Report timeouts (WorkRoutine, AutomationConstants, AutomationRunExecutionService)

  • The agent wait-timeout error text is now a shared constant, AutomationConstants.AGENT_WAIT_TIMEOUT_ERROR.
  • When a run's agent step times out, Routines now records "ran out of time before it finished" instead of the connection/model message.
  • The owner gets a short plain-text note through the routine's delivery setting: email, a Teams message to themselves, or nothing for none. It's sent while the owner's Microsoft token is still attached to the run. This applies to every routine kind, but only to timeouts.
  • MicrosoftTeamsSendChatMessageReactor.SELF_CHAT_ID is now public so the note can use it.

Push skill content to cloud storage (SkillProjects, skill reactors, CollaborationSkillFiles)

  • New SkillProjects.pushContent(projectId) pushes the project's app_root folder, the same folder SaveAssetReactor pushes. The push is a sync, so deleted files stay deleted. It does nothing outside a cluster.
  • It runs after every write of skill content: CreateSkillReactor, UpdateSkillReactor, CloneSkillReactor, and CollaborationSkillFiles.publish (after its git commit).

@ryanweiler92
ryanweiler92 requested a review from a team as a code owner November 3, 2026 20:07
@ryanweiler92 ryanweiler92 self-assigned this Nov 3, 2026
@snyk-io

snyk-io Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@ryanweiler92
ryanweiler92 merged commit 16681eb into dev Nov 3, 2026
5 checks passed
@ryanweiler92
ryanweiler92 deleted the collaboration-updates-11-03-2026 branch November 3, 2026 20:20
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