Skip to content

Emit agent config updates in OTLP session logs#1434

Merged
theomonnom merged 2 commits intomainfrom
union-loutish-vireo
May 8, 2026
Merged

Emit agent config updates in OTLP session logs#1434
theomonnom merged 2 commits intomainfrom
union-loutish-vireo

Conversation

@rosetta-livekit-bot
Copy link
Copy Markdown
Contributor

@rosetta-livekit-bot rosetta-livekit-bot Bot commented May 8, 2026

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 8, 2026

🦋 Changeset detected

Latest commit: 2d3c28a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 31 packages
Name Type
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-assemblyai Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-cerebras Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-fishaudio Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra Patch
@livekit/agents-plugin-hume Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-lemonslice Patch
@livekit/agents-plugin-liveavatar Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-minimax Patch
@livekit/agents-plugin-mistral Patch
@livekit/agents-plugin-mistralai Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-phonic Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-runway Patch
@livekit/agents-plugin-sarvam Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugins-test Patch
@livekit/agents-plugin-trugen Patch
@livekit/agents-plugin-xai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 7 additional findings in Devin Review.

Open in Devin Review

Comment on lines +752 to +757
const configUpdate = new AgentConfigUpdate({
toolsAdded: toolsAdded.length > 0 ? toolsAdded : undefined,
toolsRemoved: toolsRemoved.length > 0 ? toolsRemoved : undefined,
});
this.agent._chatCtx.insert(configUpdate);
this.agentSession.history.insert(configUpdate);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Same AgentConfigUpdate object inserted into two ChatContexts causes shared mutable state

In updateTools (agent_activity.ts:752-757) and _startSession (agent_activity.ts:469-474), the exact same AgentConfigUpdate object reference is inserted into both this.agent._chatCtx and this.agentSession.history. Since ChatContext stores items by reference, any mutation to the item (e.g., if createdAt were reassigned) would silently affect both contexts. While AgentConfigUpdate fields aren't currently mutated after construction, this violates the pattern seen elsewhere (e.g., AgentHandoffItem in agent_session.ts is typically created separately for each context). This is a latent correctness issue rather than an immediate crash.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@theomonnom theomonnom merged commit 4dc2802 into main May 8, 2026
9 checks passed
@theomonnom theomonnom deleted the union-loutish-vireo branch May 8, 2026 17:00
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