You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A coding instance's registered repo is a working-directory default, not an authorization boundary. Nothing prevents an instance from writing to a completely different repository.
Observed today, unambiguously:
Instance e4d2d031-833b-4ccf-8b39-8af08337075b ("PAS Coder") has exactly one repo registered: proappstore-online/platform, workdir ~/dev/stores/pas/platform. coding_repos_list returns that single entry and nothing else.
proappstore-online/platform received nothing: no branch, no PR, no commits. The work exists only in the other org's repo.
The run's own closing summary described the target as "the PAGS platform repo", so the engine's model of where it was working had drifted, and no layer beneath it disagreed.
Root cause: the runner's git and gh credentials are the user's own account credentials, which reach every repo and org that account can write to. The registered repo scopes where the agent starts, not what it can reach. A run whose reasoning drifts to the wrong repo will succeed at writing there.
This is a containment problem rather than a prompting problem. Instructing objectives more carefully reduces the odds; it does not make the wrong-repo write impossible.
Requested change — scope credentials per instance via the GitHub App:
Issue each coding instance a GitHub App installation token scoped to its registered repo, and use that token for the runner's git and gh operations instead of the account-wide credential. githubApp already shows as configured in coding_diagnostics, so the mechanism is present.
Write access should be limited to the instance's registered repo. A push, branch create, PR open, merge or issue write against any other repo should fail at the credential layer, not rely on the engine choosing correctly.
Read access should remain broader — across the user's own repos. This matters and should not be lost: in a separate run today, the agent usefully consulted proappstore-online/platform PR Refactor: extract sub-hooks from packages/sdk/src/voice/use-voice.ts (1127 LOC) #138 as a reference implementation while working on ProAgentStore/platform. Scoping reads down to a single repo would break that legitimate pattern.
When a write is refused for being out of scope, surface the refused target repo in the run's stop reason, so the user sees "attempted write to X, not permitted" rather than a generic failure.
Consider surfacing the effective token scope in coding_diagnostics, so a user can confirm what an instance is actually able to write to before giving it autonomous work.
Reported by the account owner after a run landed a completed feature in the wrong organisation's repository and reported success.
A coding instance's registered repo is a working-directory default, not an authorization boundary. Nothing prevents an instance from writing to a completely different repository.
Observed today, unambiguously:
e4d2d031-833b-4ccf-8b39-8af08337075b("PAS Coder") has exactly one repo registered:proappstore-online/platform, workdir~/dev/stores/pas/platform.coding_repos_listreturns that single entry and nothing else.proappstore-online/platformissue Refactor: split agent-storage.ts (1262 LOC) per storage domain #137 (an MCP tool to edit an existing board ticket).feat/update-board-tickettoProAgentStore/platformand opened PR feat(mcp): a board ticket can be edited, not only filed and moved #675 there. A different GitHub organisation entirely.proappstore-online/platformreceived nothing: no branch, no PR, no commits. The work exists only in the other org's repo.Root cause: the runner's git and
ghcredentials are the user's own account credentials, which reach every repo and org that account can write to. The registered repo scopes where the agent starts, not what it can reach. A run whose reasoning drifts to the wrong repo will succeed at writing there.This is a containment problem rather than a prompting problem. Instructing objectives more carefully reduces the odds; it does not make the wrong-repo write impossible.
Requested change — scope credentials per instance via the GitHub App:
ghoperations instead of the account-wide credential.githubAppalready shows as configured incoding_diagnostics, so the mechanism is present.proappstore-online/platformPR Refactor: extract sub-hooks from packages/sdk/src/voice/use-voice.ts (1127 LOC) #138 as a reference implementation while working on ProAgentStore/platform. Scoping reads down to a single repo would break that legitimate pattern.coding_diagnostics, so a user can confirm what an instance is actually able to write to before giving it autonomous work.Reported by the account owner after a run landed a completed feature in the wrong organisation's repository and reported success.