Feat: Add current working directory to LLM instructions (#9718)

This commit is contained in:
Tim O'Farrell
2025-07-16 15:10:03 -06:00
committed by GitHub
parent fba2218760
commit b057af8d63
15 changed files with 37 additions and 6 deletions

View File

@@ -154,6 +154,7 @@ class AgentSession:
repo_directory=repo_directory,
conversation_instructions=conversation_instructions,
custom_secrets_descriptions=custom_secrets_handler.get_custom_secrets_descriptions(),
working_dir=config.workspace_mount_path_in_sandbox,
)
# NOTE: this needs to happen before controller is created
@@ -464,6 +465,7 @@ class AgentSession:
repo_directory: str | None,
conversation_instructions: str | None,
custom_secrets_descriptions: dict[str, str],
working_dir: str,
) -> Memory:
memory = Memory(
event_stream=self.event_stream,
@@ -473,7 +475,9 @@ class AgentSession:
if self.runtime:
# sets available hosts and other runtime info
memory.set_runtime_info(self.runtime, custom_secrets_descriptions)
memory.set_runtime_info(
self.runtime, custom_secrets_descriptions, working_dir
)
memory.set_conversation_instructions(conversation_instructions)
# loads microagents from repo/.openhands/microagents