Skip to content

OpenCode GitHub Actions system prompt should tell the agent that git author identity is already configured #30409

@xlionjuan

Description

@xlionjuan

Description

Summary

OpenCode GitHub Actions appears to already configure the correct git author identity in the GitHub Actions runtime environment.

However, the agent does not seem to know this from the OpenCode GitHub Actions system prompt. As a result, when the agent needed to create a commit, it assumed that git identity was missing or needed to be configured manually. It then invented and set a GitHub noreply email:

opencode <opencode@users.noreply.github.com>

This was incorrect because opencode@users.noreply.github.com corresponds to the normal GitHub username namespace, and that username is already registered / squatted.

The issue is not that OpenCode GitHub Actions has the wrong default git identity. The issue is that the OpenCode GitHub Actions system prompt does not clearly tell the agent that git identity has already been configured and that the agent should use it as-is.

Incident

In this workflow run:

https://github.com/xlionjuan/searxng-mcp-go/actions/runs/26816964913/job/79061089035

for PR:

xlionjuan/searxng-mcp-go#31

the agent used this git author identity:

opencode <opencode@users.noreply.github.com>

Later, after I explicitly instructed the agent:

DO NOT MODIFY GIT CONFIG AGAIN

the agent recreated the commit and used the already configured bot identity:

opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>

The agent also reported that it used the bot identity already present in global git config and did not modify git config again.

This strongly suggests that the correct identity was already configured by OpenCode GitHub Actions, but the agent was not aware of that fact when making the earlier commit.

Actual behavior

The agent did not know that OpenCode GitHub Actions had already configured git identity.

Because of that, it manually changed git config and set:

user.name=opencode
user.email=opencode@users.noreply.github.com

This identity appears to have been guessed or invented by the agent.

Expected behavior

The OpenCode GitHub Actions system prompt should explicitly tell the agent that:

  1. OpenCode GitHub Actions already configures the correct git author identity in the execution environment.
  2. The agent should use the existing git identity when creating commits.
  3. The agent should not modify user.name or user.email unless explicitly instructed by the user.
  4. The agent should not invent GitHub noreply emails.
  5. The agent should check existing git config before deciding that anything is missing.

Why this matters

This is a provenance and auditability issue.

A generated commit using:

opencode <opencode@users.noreply.github.com>

can be misleading because it looks like a GitHub noreply email for the opencode username. If that username is owned by someone unrelated, the commit metadata becomes confusing or incorrect.

The deeper issue is not merely the specific bad email. The deeper issue is that the agent should not be inventing or overwriting git author identity when OpenCode GitHub Actions has already provided one.

Suggested system prompt improvement

Please consider adding explicit guidance to the OpenCode GitHub Actions system prompt, such as:

OpenCode GitHub Actions has already configured git user.name and user.email for commits in this environment.
Before creating commits, use the existing git configuration as-is.
Do not modify git config unless the user explicitly asks you to.
Do not invent GitHub noreply email addresses.
Do not derive commit author identity from the project name, product name, repository name, or agent name.
If git identity appears to be missing, inspect the current config first and ask for clarification instead of guessing.

A safer commit workflow for the agent would be:

git config --get user.name
git config --get user.email
git status
git commit -m "..."

The agent should only consider changing git identity if the user explicitly requests it.

Acceptance criteria

  • The OpenCode GitHub Actions system prompt tells the agent that git author identity is already configured.
  • The agent does not overwrite existing user.name or user.email.
  • The agent checks existing git config before committing.
  • The agent does not invent *@users.noreply.github.com addresses.
  • The agent does not use opencode <opencode@users.noreply.github.com>.
  • The agent uses the existing OpenCode GitHub Actions-provided bot identity when available.

Plugins

No response

OpenCode version

1.15.13

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04 (GitHub hosted Action Runner ubuntu-latest)

Terminal

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions