CLI: --as <Agent> from a second session's worktree of the same app runs as that session (Codex2 copies the Codex app's shared --as Codex instructions)
This commit is contained in:
1 parent
fdaa3b0806
commit
9c74b17943
1 file changed
+6
@@ -399,6 +399,12 @@ def main(argv=None):
|
|||||||
if not agent:
|
if not agent:
|
||||||
agent = project.identity_for(os.getcwd())
|
agent = project.identity_for(os.getcwd())
|
||||||
source = "working directory" if agent else None
|
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 = []
|
recorded = []
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user