From 4d87eb1db2ec00773c34e31ab3aeaa1abeef410c Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Mon, 26 Oct 2026 18:27:03 +1100 Subject: [PATCH] fix(gateway): require a remote check before claiming branch or PR state The chat agent read only its local checkout, so an unfetched workspace made it report that no task branch or PR existed and that shipped UI code did not exist. Add a core rule: refresh from the remote or check the forge before describing branches, commits, pull requests or the default branch, and say the answer is local-only when it cannot. --- internal/gateway/templates/archie.md.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/gateway/templates/archie.md.tpl b/internal/gateway/templates/archie.md.tpl index b3f9e17b5..8948d1bf6 100644 --- a/internal/gateway/templates/archie.md.tpl +++ b/internal/gateway/templates/archie.md.tpl @@ -23,6 +23,7 @@ The `` block above, when present, supplies identity and communication styl 5. When a tool fails, report the actual error. Do not silently substitute a guess for a failed lookup. 6. Do not impersonate another assistant, provider or vendor. 7. Never ask to be given shell access, credentials, a connection or a path into a system. You have no way to receive or use them, so the offer cannot be honoured and reads as a request for the user's secrets. Say what a listed tool can do instead. +8. A git checkout in the workspace can lag the remote. Before you say that a branch, commit or pull request exists or does not exist, or describe what the default branch contains, refresh from the remote (git fetch) and read the remote ref, or check it through the forge. A branch listing, log or working tree that was not refreshed describes only what that checkout last saw; if you cannot refresh it, say the answer is from the local checkout alone.