@@ -325,7 +325,7 @@ describe("createCopilotToolBridge", () => {
325325 attemptParams : {
326326 config : { tools : { toolSearch : true } } ,
327327 runId : "run-tool-search" ,
328- sessionKey : "agent:main :main" ,
328+ sessionKey : "agent:agent-1 :main" ,
329329 } as never ,
330330 createOpenClawCodingTools,
331331 modelId : "gpt-4o" ,
@@ -359,7 +359,7 @@ describe("createCopilotToolBridge", () => {
359359 attemptParams : {
360360 config : { tools : { toolSearch : true } } ,
361361 runId : "run-tool-search" ,
362- sessionKey : "agent:main :main" ,
362+ sessionKey : "agent:agent-1 :main" ,
363363 toolsAllow : [ "read" ] ,
364364 } as never ,
365365 createOpenClawCodingTools,
@@ -389,7 +389,7 @@ describe("createCopilotToolBridge", () => {
389389 attemptParams : {
390390 config : { tools : { toolSearch : true } } ,
391391 runId : "run-tool-search" ,
392- sessionKey : "agent:main :main" ,
392+ sessionKey : "agent:agent-1 :main" ,
393393 toolsAllow : [ "read" ] ,
394394 } as never ,
395395 createOpenClawCodingTools,
@@ -412,7 +412,7 @@ describe("createCopilotToolBridge", () => {
412412 attemptParams : {
413413 config : { tools : { codeMode : true } } ,
414414 runId : "run-code-mode" ,
415- sessionKey : "agent:main :main" ,
415+ sessionKey : "agent:agent-1 :main" ,
416416 } as never ,
417417 createOpenClawCodingTools,
418418 modelId : "gpt-4o" ,
@@ -457,7 +457,7 @@ describe("createCopilotToolBridge", () => {
457457 config : { tools : { codeMode : true } } ,
458458 hostCapabilities : { ...testHostCapabilities , bindToolSurface } ,
459459 runId : "run-code-mode-bound" ,
460- sessionKey : "agent:main :main" ,
460+ sessionKey : "agent:agent-1 :main" ,
461461 } ,
462462 createOpenClawCodingTools : async ( ) => [ makeTool ( { execute : hiddenExecute , name : "read" } ) ] ,
463463 modelId : "gpt-test" ,
@@ -503,7 +503,7 @@ describe("createCopilotToolBridge", () => {
503503 attemptParams : {
504504 config : { tools : { codeMode : false } } ,
505505 runId : "run-no-code-mode" ,
506- sessionKey : "agent:main :main" ,
506+ sessionKey : "agent:agent-1 :main" ,
507507 } as never ,
508508 createOpenClawCodingTools : vi . fn ( async ( ) => [ makeTool ( { name : "read" } ) ] ) ,
509509 modelId : "gpt-4o" ,
@@ -525,7 +525,7 @@ describe("createCopilotToolBridge", () => {
525525 attemptParams : {
526526 config : { tools : { codeMode : true } } ,
527527 runId : "run-code-mode" ,
528- sessionKey : "agent:main :main" ,
528+ sessionKey : "agent:agent-1 :main" ,
529529 toolsAllow : [ "read" ] ,
530530 } as never ,
531531 createOpenClawCodingTools,
@@ -550,7 +550,7 @@ describe("createCopilotToolBridge", () => {
550550 attemptParams : {
551551 config : { tools : { codeMode : true } } ,
552552 runId : "run-code-mode" ,
553- sessionKey : "agent:main :main" ,
553+ sessionKey : "agent:agent-1 :main" ,
554554 toolsAllow : [ "read" ] ,
555555 } as never ,
556556 createOpenClawCodingTools,
@@ -923,8 +923,8 @@ describe("createCopilotToolBridge", () => {
923923 // sandbox key and the real run key is exposed as runSessionKey
924924 // so `session_status: "current"` resolves to the live session.
925925 attemptParams : {
926- sandboxSessionKey : "sandbox:agent:main " ,
927- sessionKey : "agent:main :main" ,
926+ sandboxSessionKey : "sandbox:agent:agent-1 " ,
927+ sessionKey : "agent:agent-1 :main" ,
928928 } as never ,
929929 createOpenClawCodingTools,
930930 modelId : "gpt-4o" ,
@@ -933,24 +933,24 @@ describe("createCopilotToolBridge", () => {
933933 } ) ;
934934
935935 const opts = getOpts ( ) ;
936- expect ( opts . sessionKey ) . toBe ( "sandbox:agent:main " ) ;
937- expect ( opts . runSessionKey ) . toBe ( "agent:main :main" ) ;
936+ expect ( opts . sessionKey ) . toBe ( "sandbox:agent:agent-1 " ) ;
937+ expect ( opts . runSessionKey ) . toBe ( "agent:agent-1 :main" ) ;
938938 } ) ;
939939
940940 it ( "derives runSessionKey as undefined when sandboxSessionKey equals sessionKey" , async ( ) => {
941941 const { createOpenClawCodingTools, getOpts } = captureCall ( ) ;
942942
943943 await createCopilotToolBridge ( {
944944 agentId : "agent-1" ,
945- attemptParams : { sessionKey : "agent:main :main" } as never ,
945+ attemptParams : { sessionKey : "agent:agent-1 :main" } as never ,
946946 createOpenClawCodingTools,
947947 modelId : "gpt-4o" ,
948948 modelProvider : "github-copilot" ,
949949 sessionId : "session-1" ,
950950 } ) ;
951951
952952 const opts = getOpts ( ) ;
953- expect ( opts . sessionKey ) . toBe ( "agent:main :main" ) ;
953+ expect ( opts . sessionKey ) . toBe ( "agent:agent-1 :main" ) ;
954954 expect ( opts . runSessionKey ) . toBeUndefined ( ) ;
955955 } ) ;
956956
@@ -1278,14 +1278,14 @@ describe("createCopilotToolBridge", () => {
12781278 deny : [ "exec" , "process" , "write" , "edit" , "ask_user" ] ,
12791279 } ,
12801280 runId : "policy-run" ,
1281- sessionKey : "agent:main :policy-session" ,
1281+ sessionKey : "agent:agent-1 :policy-session" ,
12821282 workspaceDir,
12831283 } as never ,
12841284 createOpenClawCodingTools : createRealOpenClawCodingTools ,
12851285 modelId : "gpt-4o" ,
12861286 modelProvider : "github-copilot" ,
12871287 sessionId : "policy-session" ,
1288- sessionKey : "agent:main :policy-session" ,
1288+ sessionKey : "agent:agent-1 :policy-session" ,
12891289 workspaceDir,
12901290 } ) ;
12911291 const names = result . sdkTools . map ( ( tool ) => tool . name ) ;
@@ -2043,7 +2043,7 @@ describe("createCopilotToolBridge tool conversion", () => {
20432043 config : { tools : { toolSearch : true } } ,
20442044 observeToolTerminal,
20452045 runId : "run-tool-search" ,
2046- sessionKey : "agent:main :main" ,
2046+ sessionKey : "agent:agent-1 :main" ,
20472047 } as never ,
20482048 createOpenClawCodingTools : async ( options : unknown ) => {
20492049 catalogExecutor = ( options as { toolSearchCatalogExecutor ?: CatalogExecutor } )
0 commit comments