[Improve] Preserve source context for child tasks - #1190
Merged
Conversation
Contributor
|
1 issue outstanding. See task
Reviewed 9f6996c |
Contributor
Author
|
Fixed inherited source-context reply safety in f955061. Inherited provider-neutral coordinates now remain informational: the worker does not export active reply environment or register turn-satisfaction closeout hooks for them. Added focused worker coverage; targeted tests, worker static checks, and the repository pre-push suite pass. |
- launchTask reverts to the old sourceRunId stamping (env-definition or notifyOnSettle only) and carries the parent pointer in a dedicated transient communicationContextSourceRunId field instead, so relaunch lineage, settle notifications, and the activation metric are unchanged - inheritance skips launches that carry their own live communication context, stamps 'slack' when parent coordinates come from Slack task columns, and only flags communicationContextInherited when coordinates were actually copied - drop the report-back rule line from task_source_context; coordinates only, and escape the provider like the other fields - restore empty-string option fallback semantics in populateCommunicationMetadata
daniel-lxs
marked this pull request as ready for review
August 10, 2026 20:03
daniel-lxs
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
August 10, 2026 20:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
No linked issue. This is internal Roomote work requested from the communication-context launch flow.
Why this PR exists
What changed
Child tasks launched from a run token now retain the parent task's provider-neutral communication coordinates (provider, channel, thread, and message identifiers). Standard agents see those coordinates in a read-only
<task_source_context>block so they know where the work originated; the block carries coordinates only, with no extra behavioral rules.The parent pointer for this inheritance travels in a dedicated transient
communicationContextSourceRunIdfield rather thansourceRunId, so relaunch lineage, settle notifications, and the activation metric keep their existing semantics. Inheritance skips launches that already carry their own live communication context, and payloads are flaggedcommunicationContextInheritedonly when coordinates were actually copied. Inherited coordinates stay informational: they do not register live reply tools, messaging instructions, or turn-satisfaction closeout hooks, while direct communication turns are unchanged.The shared
populateCommunicationMetadatahelper extracted from the snapshot-resume path keeps the historical semantics where empty-string options fall back to the source payload.How it was tested
sourceRunIdstamping, and prompt coverage for the source-context block.pnpm lint:fastandpnpm check-types:fast.pnpm knipreports a pre-existing configuration hint that also reproduces ondeveloplocally; unrelated to this change.Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changeset