@@ -59,29 +59,44 @@ it.layer(NodeServices.layer)("ClaudeHome", (it) => {
5959 ) ;
6060 } ) ;
6161
62- it . effect ( "labels Claude processes t3-code unless instance env or Claude settings set one" , ( ) =>
63- Effect . gen ( function * ( ) {
64- const fileSystem = yield * FileSystem . FileSystem ;
65- const path = yield * Path . Path ;
66- const homePath = yield * fileSystem . makeTempDirectoryScoped ( { prefix : "t3-claude-home-" } ) ;
67- const host = { CLAUDE_CODE_ENTRYPOINT : "claude-desktop" , KEEP : "1" } ;
68- const instance = [ { name : "CLAUDE_CODE_ENTRYPOINT" , value : "instance" , sensitive : false } ] ;
62+ it . effect (
63+ "drops the launching Claude session and labels processes t3-code unless overridden" ,
64+ ( ) =>
65+ Effect . gen ( function * ( ) {
66+ const fileSystem = yield * FileSystem . FileSystem ;
67+ const path = yield * Path . Path ;
68+ const homePath = yield * fileSystem . makeTempDirectoryScoped ( { prefix : "t3-claude-home-" } ) ;
69+ const host = {
70+ CLAUDE_CODE_ENTRYPOINT : "claude-desktop" ,
71+ CLAUDECODE : "1" ,
72+ CLAUDE_CODE_SESSION_ID : "host-session" ,
73+ CLAUDE_CODE_MESSAGING_SOCKET : "/tmp/host-claude.sock" ,
74+ CLAUDE_EFFORT : "high" ,
75+ KEEP : "1" ,
76+ } ;
77+ const instance = [
78+ { name : "CLAUDE_CODE_ENTRYPOINT" , value : "instance" , sensitive : false } ,
79+ { name : "CLAUDE_EFFORT" , value : "low" , sensitive : false } ,
80+ ] ;
6981
70- expect ( yield * mergeClaudeProcessEnvironment ( { homePath } , undefined , host ) ) . toMatchObject ( {
71- CLAUDE_CODE_ENTRYPOINT : "t3-code" ,
72- KEEP : "1" ,
73- } ) ;
74- expect (
75- ( yield * mergeClaudeProcessEnvironment ( { homePath } , instance , host ) ) . CLAUDE_CODE_ENTRYPOINT ,
76- ) . toBe ( "instance" ) ;
82+ expect ( yield * mergeClaudeProcessEnvironment ( { homePath } , undefined , host ) ) . toEqual ( {
83+ CLAUDE_CODE_ENTRYPOINT : "t3-code" ,
84+ KEEP : "1" ,
85+ } ) ;
86+ expect ( yield * mergeClaudeProcessEnvironment ( { homePath } , instance , host ) ) . toEqual ( {
87+ CLAUDE_CODE_ENTRYPOINT : "instance" ,
88+ CLAUDE_EFFORT : "low" ,
89+ KEEP : "1" ,
90+ } ) ;
7791
78- yield * fileSystem . writeFileString (
79- path . join ( homePath , "settings.json" ) ,
80- JSON . stringify ( { env : { CLAUDE_CODE_ENTRYPOINT : "custom" } } ) ,
81- ) ;
82- expect (
83- ( yield * mergeClaudeProcessEnvironment ( { homePath } , instance , host ) ) . CLAUDE_CODE_ENTRYPOINT ,
84- ) . toBe ( "custom" ) ;
85- } ) ,
92+ yield * fileSystem . writeFileString (
93+ path . join ( homePath , "settings.json" ) ,
94+ JSON . stringify ( { env : { CLAUDE_CODE_ENTRYPOINT : "custom" } } ) ,
95+ ) ;
96+ expect (
97+ ( yield * mergeClaudeProcessEnvironment ( { homePath } , instance , host ) )
98+ . CLAUDE_CODE_ENTRYPOINT ,
99+ ) . toBe ( "custom" ) ;
100+ } ) ,
86101 ) ;
87102} ) ;
0 commit comments