Repository navigation
Description
Summary
An agent created from a repository the creator owns, with the creator's own saved personal GitHub token, is created pull-only. The create response says the repository "is a shared catalog template". The repository is in no catalog. The default "an agent owns its repository" outcome (working branch, auto-sync on, pause-schedules on) is therefore never reached without passing source_mode: false explicitly.
Build + row
v1.0.0-rc2 (96f88f982), release-test row B6 (Git sync & durability). Same code on dev.
Steps
- Save a personal GitHub token (Settings → MCP Keys → Personal GitHub Token) for account
alice. - Create a private repository
alice/my-agentowned by that account, not listed in any template catalog. POST /api/agentswith{"name": "t1", "template": "github:alice/my-agent"}as that user.
Expected
Per the GitHub Sync user doc ("Creating an agent with sync"): the repository is not a catalog template, its owner is the token's account, the token is the user's own, and it can push. The agent gets a working branch with auto-sync on. git_mode.pushes is true.
Actual
"git_mode": {"kind": "agent", "source_mode": true, "pushes": false,
"reason": "alice/my-agent is a shared catalog template: pull-only. Fork it to your own repository to keep this agent's work in git"}GET /api/agents/t1/git/auto-sync → auto_sync_enabled: false. The same request with "source_mode": false returns pushes: true and a trinity/<agent>/<id> branch, so the token and repository are fine.
Where
src/backend/services/template_service.py—get_github_template(). Its final branch ("Dynamic: repo not in any configured list but still a valid github: ID") builds and returns a template for everygithub:id. The function never returnsNonefor one.src/backend/services/agent_service/crud.py— the create path calls_apply_agent_kind_default(..., catalog_template=bool(gh_template)). Sincegh_templateis always truthy,catalog_templateis alwaysTrue, and theif catalog_template:branch returns pull-only before the ownership and push checks run. The "Dynamic GitHub template" branch of_resolve_github_repo_and_patis unreachable for the same reason.tests/unit/test_1484_create_agent_characterization.py— the own-repository cases setget_github_template.return_value = None # dynamic. The real function does not behave that way, so the tests pass against a stub that production never matches.
Acceptance criteria
-
catalog_templateis true only for a repository that is in the configured list, the registry or the defaults; a repository resolved through the dynamic fall-through is not a catalog template. - Creating from an own, non-catalog repository with an own token returns
git_mode.pushes: truewith a working branch, auto-sync on and pause-schedules on. - A catalog template still comes out pull-only.
- A test exercises the real
get_github_template()for a non-catalog repository instead of aNonestub.
Activity
obasilakis commentedon Oct 11, 2026
Decision for the 1.0 cut (@obasilakis): release note. This is not fixed before the cut.
obasilakis commentedon Oct 13, 2026
/claim
github-actions commentedon Oct 13, 2026
@obasilakis This issue is already assigned to obasilakis. Use
/unclaimfirst if you want to take over.docs(learnings): a stub's default return has to be one the real funct…
fix(agents): an own non-catalog repo is no longer treated as a shared…