This repository was archived by the owner on Apr 1, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,7 +82,13 @@ export const TuiThreadCommand = cmd({
8282 return undefined
8383 } ) ( )
8484
85- const worker = new Worker ( "./src/cli/cmd/tui/worker.ts" )
85+ const worker = new Worker ( "./src/cli/cmd/tui/worker.ts" , {
86+ env : Object . fromEntries (
87+ Object . entries ( process . env ) . filter (
88+ ( entry ) : entry is [ string , string ] => entry [ 1 ] !== undefined ,
89+ ) ,
90+ ) ,
91+ } )
8692 worker . onerror = console . error
8793 const client = Rpc . client < typeof rpc > ( worker )
8894 process . on ( "uncaughtException" , ( e ) => {
Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ const cli = yargs(hideBin(process.argv))
6262 } ) ( ) ,
6363 } )
6464
65- process . env [ "OPENCODE" ] = "1"
65+ process . env . AGENT = "1"
66+ process . env . OPENCODE = "1"
6667
6768 Log . Default . info ( "opencode" , {
6869 version : Installation . VERSION ,
Original file line number Diff line number Diff line change @@ -144,6 +144,9 @@ export const BashTool = Tool.define("bash", {
144144 const proc = spawn ( params . command , {
145145 shell : true ,
146146 cwd : Instance . directory ,
147+ env : {
148+ ...process . env ,
149+ } ,
147150 stdio : [ "ignore" , "pipe" , "pipe" ] ,
148151 detached : process . platform !== "win32" ,
149152 } )
You can’t perform that action at this time.
0 commit comments