Skip to content

Bug: Sub‑agent patch created but not applied to parent workspace #2112

@craigtsmith

Description

@craigtsmith

Bug: Sub-agent patch created but not applied to parent workspace

Summary

An exec sub-agent reports a successful commit and generates a patch artifact, but the change does not appear in the parent workspace. The patch exists in session artifacts but task_apply_git_patch fails to find it.

Expected

After a sub-agent completes, the committed change (or its patch) should be applied or easily available to apply via task_apply_git_patch. The new file should exist and the commit should appear in git log.

Actual

  • The reported commit is not present in the parent workspace.
  • The file created by the sub-agent is missing.
  • A patch artifact does exist in session artifacts.
  • task_apply_git_patch fails with “No git patch artifact found for this taskId.”

Repro Steps (Generic)

  1. Spawn an exec based custom sub-agent to create a new file at repo root and commit it.
  2. Wait for the sub-agent to finish and report a commit hash.
  3. Call task_apply_git_patch with the child task ID.
  4. Observe it fails with “No git patch artifact found for this taskId.”
  5. In the parent workspace, run:
    • git log -5 --oneline
    • ls <new-file>
  6. Observe the commit and file are missing.
  7. Inspect session artifacts and find an mbox patch containing the change.

Impact

Sub-agent work appears successful but is not reflected in the parent workspace, and the normal patch application tool cannot find the patch.

Notes

This seems to affect exec sub-agents; patch artifacts exist but are not automatically applied or attached for task_apply_git_patch.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions