Skip to content

fix(agent): preserve task run ID for artifact uploads - #3844

Merged
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/fix-artifact-upload-context
Jul 27, 2026
Merged

fix(agent): preserve task run ID for artifact uploads#3844
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/fix-artifact-upload-context

Conversation

@puemos

@puemos puemos commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Problem

Codex artifact uploads were enabled with a task run ID in the parent process, but the spawned MCP server discarded that ID and rejected every upload as unavailable.

Changes

Preserve taskRunId when decoding and forwarding the local-tool context.

Why: Generated files should be deliverable from Codex cloud tasks through the existing artifact upload tool.

image

How did you test this?

  • Built @posthog/agent
  • Ran the focused upload-artifact tests
  • Invoked the bundled MCP server directly before and after the fix; the call advanced from the missing-session error to the expected local storage-configuration guard

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

Generated-By: PostHog Code
Task-Id: 577e32f4-830b-4174-a9c4-efa9464652a1
@trunk-io

trunk-io Bot commented Jul 27, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 09b54be.

@puemos
puemos requested a review from a team July 27, 2026 15:16
@puemos
puemos marked this pull request as ready for review July 27, 2026 16:00
@puemos puemos self-assigned this Jul 27, 2026
@trunk-io
trunk-io Bot merged commit 42bd848 into main Jul 27, 2026
36 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/fix-artifact-upload-context branch July 27, 2026 17:26
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.

3 participants