Skip to content

Clean up LRC state logs for shared sessions#12237

Open
seemeroland wants to merge 2 commits into
masterfrom
roland/shared-session-udi-logs
Open

Clean up LRC state logs for shared sessions#12237
seemeroland wants to merge 2 commits into
masterfrom
roland/shared-session-udi-logs

Conversation

@seemeroland
Copy link
Copy Markdown
Contributor

@seemeroland seemeroland commented Jun 5, 2026

Description

The emit_long_running_command_agent_interaction_state_changed log was emitted even if we never actually sent an event over the shared session network. The network caches the previous state and avoids sending if nothing changed.

The UniversalDeveloperInputContextUpdated: applying LRC interaction_state log was emitted followed by an error log if we tried to apply a state that already matched our current state.

Clean up the log so only emitted when something changes, since it misled me when debugging some runs

@cla-bot cla-bot Bot added the cla-signed label Jun 5, 2026
@seemeroland seemeroland marked this pull request as ready for review June 5, 2026 00:22
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Jun 5, 2026

@seemeroland

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR removes some misleading LRC interaction-state apply logs and avoids applying shared-session LRC state when it already matches local state.

Concerns

  • The new sharer-side context-update log dumps the full UniversalDeveloperInputContextUpdate, which can include selected conversation/server tokens and other shared-session state in client logs.
  • The new agent_has_control=true warning fires during the normal handoff path, so it turns expected behavior into warning-level noise.

Security

  • Avoid logging full shared-session context updates; log only non-sensitive field names or redact token-bearing fields.

Verdict

Found: 0 critical, 2 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment on lines +734 to +737
sharer_info!(
self,
"sending universal developer input context update: {update:?}"
);
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.

⚠️ [IMPORTANT] [SECURITY] Logging the full UniversalDeveloperInputContextUpdate can expose selected conversation/server tokens and shared-session state in client logs. Log only non-sensitive fields, such as which update fields are present, or redact token-bearing fields before emitting this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nothing in here is sensitive

Comment thread app/src/terminal/view.rs Outdated
@seemeroland seemeroland requested a review from captainsafia June 5, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant