Skip to content

Fix Python indentation error in background_agent_mvp workflow#49553

Closed
morgankrey wants to merge 1 commit into
mainfrom
fix/background-agent-python-indent
Closed

Fix Python indentation error in background_agent_mvp workflow#49553
morgankrey wants to merge 1 commit into
mainfrom
fix/background-agent-python-indent

Conversation

@morgankrey
Copy link
Copy Markdown
Contributor

Fix Python indentation error in background_agent_mvp workflow

The Python script inside python3 -c '...' had leading whitespace on all lines:

python3 -c '
            import re
            import sys
            ...
'

When the YAML is processed and passed to the shell, these leading spaces become part of the Python code. Python interprets the indentation as block-level indentation, causing:

IndentationError: unexpected indent

This error caused the workflow to fail after successfully creating branches and commits, but before creating/updating the PR.

Fix: Remove all leading indentation from the Python code within the python3 -c block.

Release Notes:

  • N/A

@morgankrey morgankrey requested a review from a team as a code owner February 19, 2026 02:16
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Feb 19, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Feb 19, 2026
@morgankrey morgankrey force-pushed the fix/background-agent-python-indent branch 7 times, most recently from 166d7f2 to f580088 Compare February 19, 2026 02:58
@morgankrey morgankrey enabled auto-merge (squash) February 19, 2026 02:58
@morgankrey morgankrey force-pushed the fix/background-agent-python-indent branch 2 times, most recently from 62f040c to 6c3438f Compare February 19, 2026 03:12
Use heredoc to write Python script to temp file instead of inline
python3 -c, which was causing YAML parsing errors due to indented
Python code appearing at column 0.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@morgankrey morgankrey force-pushed the fix/background-agent-python-indent branch from 6c3438f to cfb1b34 Compare February 19, 2026 03:13
@morgankrey morgankrey closed this Feb 24, 2026
auto-merge was automatically disabled February 24, 2026 14:52

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant