Skip to content

fix(delegate-task): report the real background task id#2533

Merged
code-yeongyu merged 1 commit intocode-yeongyu:devfrom
Gujiassh:fix/background-task-metadata-id
Mar 25, 2026
Merged

fix(delegate-task): report the real background task id#2533
code-yeongyu merged 1 commit intocode-yeongyu:devfrom
Gujiassh:fix/background-task-metadata-id

Conversation

@Gujiassh
Copy link
Copy Markdown
Contributor

@Gujiassh Gujiassh commented Mar 12, 2026

Summary

  • emit the actual background task id in <task_metadata> instead of repeating the subagent session id under task_id
  • keep background_output(task_id=...) aligned with the metadata block that background task producers return
  • update the direct delegate-task compatibility tests to assert the corrected contract for resolved and late-resolved sessions

Validation

Notes

  • this PR stays fully outside the open session-manager storage fix (#2524); it only touches delegate-task background metadata formatting

Summary by cubic

Fixes delegate-task metadata to emit the actual background task ID instead of the session ID. Keeps <task_metadata> aligned with the background_output(task_id=...) contract so callers pass the correct ID.

  • Bug Fixes
    • Set task_id in <task_metadata> to the background task ID; session_id remains unchanged.
    • Ensure task_id and background_task_id both reflect the launched task.
    • Updated tests for resolved and late-resolved sessions to assert the corrected contract.

Written for commit 1e0823a. Summary will update on new commits.

Keep background task metadata aligned with the background_output contract so callers do not pass a session id where the task manager expects a background task id.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <[email protected]>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Fixes an obvious incorrect variable usage where session_id was being used for task_id in metadata. Changes are minimal, isolated, and verified with tests.

@Gujiassh
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@Gujiassh
Copy link
Copy Markdown
Contributor Author

recheck

@code-yeongyu code-yeongyu added the triage:bug Confirmed bug with repro steps label Mar 24, 2026
@code-yeongyu code-yeongyu merged commit 7327439 into code-yeongyu:dev Mar 25, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage:bug Confirmed bug with repro steps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants