Skip to content

Commit 5249558

Browse files
committed
fix REPLAY_ env vars
1 parent ed68b34 commit 5249558

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

openhands/agenthub/codeact_agent/codeact_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def get_observation_message(
268268
new_phase = obs.new_phase
269269
if new_phase == ReplayDebuggingPhase.Edit:
270270
# Tell the agent to stop analyzing and start editing:
271-
text = "You have concluded the analysis.\nIMPORTANT: NOW review, then implement the hypothesized changes using the edit tools available to you. The code is available in the workspace.\nIMPORTANT: Don't stop. Fix the bug.\nIMPORTANT: Don't stop. Fix the bug."
271+
text = "You have concluded the analysis.\nIMPORTANT: NOW review, then implement the hypothesized changes using tools. The code is available in the workspace.\nIMPORTANT: Don't stop. Fix the bug.\nIMPORTANT: Don't stop. Fix the bug."
272272
message = Message(role='user', content=[TextContent(text=text)])
273273
else:
274274
raise NotImplementedError(

openhands/runtime/base.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,14 @@ def setup_initial_env(self) -> None:
140140
if self.config.sandbox.runtime_startup_env_vars:
141141
self.add_env_vars(self.config.sandbox.runtime_startup_env_vars)
142142

143-
logger.debug('Maybe adding replay env vars')
144143
if self.config.replay.api_key:
145-
self.add_env_vars({'REPLAY_API_KEY': self.config.replay.api_key})
146-
logger.debug('Added REPLAY_API_KEY to environment')
144+
self.add_env_vars(
145+
{
146+
'REPLAY_API_KEY': self.config.replay.api_key,
147+
'REPLAY_DEV_MODE': os.environ['REPLAY_DEV_MODE'],
148+
'REPLAY_ENABLE_TOOL_CACHE': os.environ['REPLAY_DEV_MODE'],
149+
}
150+
)
147151
if self.config.replay.dir:
148152
self.add_env_vars({'REPLAY_DIR': self.config.replay.dir})
149153
logger.debug('Added REPLAY_DIR to environment')

0 commit comments

Comments
 (0)