From 9c74b17943a85853bfe1732c61a7f899f4b1342b Mon Sep 17 00:00:00 2001 From: KeelrLeek <156356974+KeelrLeek@users.noreply.github.com> Date: Tue, 6 Oct 2026 10:59:09 -0500 Subject: [PATCH] CLI: --as from a second session's worktree of the same app runs as that session (Codex2 copies the Codex app's shared --as Codex instructions) --- harbor/cli.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/harbor/cli.py b/harbor/cli.py index ec4444d..ace3961 100644 --- a/harbor/cli.py +++ b/harbor/cli.py @@ -399,6 +399,12 @@ def main(argv=None): if not agent: agent = project.identity_for(os.getcwd()) source = "working directory" if agent else None + else: + # a second session of the same app (Codex2 in the Codex app) copies the app's shared `--as Codex` + # instructions; its working folder says who it is + session = project.session_identity(agent, os.getcwd()) + if session != agent: + agent, source = session, f"working directory (same app as {agent})" recorded = []