<@U090ER7JPHA>: did we recently change the default...
# slackbot-chatter
l
@nutritious-balloon-65098: did we recently change the default directory for repo files to be downloaded from
/workspace/{repo_name}
to
/workspace/project/{repo_name}
? Was this change made consistently across the entire codebase? I have noticed that the agent recently has been failing when it first starts work and needs to cd into the appropriate directory more often.
n
I'm on it! Graham Neubig can track my progress here.
Investigation Summary: OpenHands Workspace Directory Changes Based on my thorough investigation of the OpenHands codebase, here are the key findings regarding workspace directory structure changes: Answer to Your Question: Yes, there was a significant change to the default workspace directory structure, but not exactly as you described. What Actually Changed: 1. May 2024 Change (Commit b3a45ed7f): The default
workspace_base
was changed from
os.getcwd()
to
os.path.join(os.getcwd(), 'workspace')
. This means the default workspace directory changed from the current working directory to a
workspace
subdirectory. 2. Current Environment Configuration: The runtime environment shows: ◦
WORKSPACE_BASE=/workspace/project
◦
WORKSPACE_MOUNT_PATH_IN_SANDBOX=/workspace/project
The Root Cause of Agent Failures: The issue you're experiencing is likely due to a mismatch between workspace configuration and repository cloning behavior: • Expected: The workspace is configured to be
/workspace/project
• Actual: Repositories are cloned to
/workspace/{repo_name}
(e.g.,
/workspace/OpenHands
) When agents start, they expect to be in the configured workspace directory (
/workspace/project
), but repositories are actually cloned to
/workspace/{repo_name}
, causing the need for additional
cd
commands. Consistency Across Codebase: The change appears to be inconsistently applied: • The core configuration correctly uses the new workspace structure • Repository cloning logic still uses the old pattern of cloning to
/workspace/{repo_name}
• Environment variables suggest
/workspace/project
as the expected workspace • But the actual OpenHands repository we examined is in
/workspace/OpenHands
Recommendation: This inconsistency between the configured workspace path (
/workspace/project
) and the actual repository location (
/workspace/{repo_name}
) is likely the source of the agent startup issues you've observed. The codebase needs alignment between: 3. Where the workspace is configured to be 4. Where repositories are actually cloned 5. Where agents expect to start working This explains why agents have been "failing when they first start work and need to cd into the appropriate directory more often" - there's a fundamental mismatch in the expected vs. actual workspace locations.
Investigation Summary: OpenHands Workspace Directory Changes Based on my thorough investigation of the OpenHands codebase, here are the key findings regarding workspace directory structure changes: Answer to Your Question: Yes, there was a significant change to the default workspace directory structure, but not exactly as you described. What Actually Changed: 1. May 2024 Change (Commit b3a45ed7f): The default
workspace_base
was changed from
os.getcwd()
to
os.path.join(os.getcwd(), 'workspace')
. This means the default workspace directory changed from the current working directory to a
workspace
subdirectory. 2. Current Environment Configuration: The runtime environment shows: ◦
WORKSPACE_BASE=/workspace/project
◦
WORKSPACE_MOUNT_PATH_IN_SANDBOX=/workspace/project
The Root Cause of Agent Failures: The issue you're experiencing is likely due to a mismatch between workspace configuration and repository cloning behavior: • Expected: The workspace is configured to be
/workspace/project
• Actual: Repositories are cloned to
/workspace/{repo_name}
(e.g.,
/workspace/OpenHands
) When agents start, they expect to be in the configured workspace directory (
/workspace/project
), but repositories are actually cloned to
/workspace/{repo_name}
, causing the need for additional
cd
commands. Consistency Across Codebase: The change appears to be inconsistently applied: • The core configuration correctly uses the new workspace structure • Repository cloning logic still uses the old pattern of cloning to
/workspace/{repo_name}
• Environment variables suggest
/workspace/project
as the expected workspace • But the actual OpenHands repository we examined is in
/workspace/OpenHands
Recommendation: This inconsistency between the configured workspace path (
/workspace/project
) and the actual repository location (
/workspace/{repo_name}
) is likely the source of the agent startup issues you've observed. The codebase needs alignment between: 3. Where the workspace is configured to be 4. Where repositories are actually cloned 5. Where agents expect to start working This explains why agents have been "failing when they first start work and need to cd into the appropriate directory more often" - there's a fundamental mismatch in the expected vs. actual workspace locations.
Investigation Summary: OpenHands Workspace Directory Changes Based on my thorough investigation of the OpenHands codebase, here are the key findings regarding workspace directory structure changes: Answer to Your Question: Yes, there was a significant change to the default workspace directory structure, but not exactly as you described. What Actually Changed: 1. May 2024 Change (Commit b3a45ed7f): The default
workspace_base
was changed from
os.getcwd()
to
os.path.join(os.getcwd(), 'workspace')
. This means the default workspace directory changed from the current working directory to a
workspace
subdirectory. 2. Current Environment Configuration: The runtime environment shows: ◦
WORKSPACE_BASE=/workspace/project
◦
WORKSPACE_MOUNT_PATH_IN_SANDBOX=/workspace/project
The Root Cause of Agent Failures: The issue you're experiencing is likely due to a mismatch between workspace configuration and repository cloning behavior: • Expected: The workspace is configured to be
/workspace/project
• Actual: Repositories are cloned to
/workspace/{repo_name}
(e.g.,
/workspace/OpenHands
) When agents start, they expect to be in the configured workspace directory (
/workspace/project
), but repositories are actually cloned to
/workspace/{repo_name}
, causing the need for additional
cd
commands. Consistency Across Codebase: The change appears to be inconsistently applied: • The core configuration correctly uses the new workspace structure • Repository cloning logic still uses the old pattern of cloning to
/workspace/{repo_name}
• Environment variables suggest
/workspace/project
as the expected workspace • But the actual OpenHands repository we examined is in
/workspace/OpenHands
Recommendation: This inconsistency between the configured workspace path (
/workspace/project
) and the actual repository location (
/workspace/{repo_name}
) is likely the source of the agent startup issues you've observed. The codebase needs alignment between: 3. Where the workspace is configured to be 4. Where repositories are actually cloned 5. Where agents expect to start working This explains why agents have been "failing when they first start work and need to cd into the appropriate directory more often" - there's a fundamental mismatch in the expected vs. actual workspace locations.
OpenHands encountered an unknown error. See the conversation for more information, or try again
Investigation Summary: OpenHands Workspace Directory Structure Answer to your question: No, there was no recent change from
/workspace/{repo_name}
to
/workspace/project/{repo_name}
as the default directory structure in the OpenHands codebase. Key Findings: 1. No Code Changes to
/workspace/project
: After thoroughly searching the entire OpenHands codebase, I found no evidence of a systematic change to use
/workspace/project
as the default workspace structure. The only mentions of "project" in workspace contexts are in test files using example paths like
/home/user/project
. 2. Actual Historical Change (May 2024): There was a significant workspace-related change in commit
b3a45ed7f
from May 16, 2024, but it changed the default
workspace_base
from
os.getcwd()
to
os.path.join(os.getcwd(), 'workspace')
- meaning it added a
workspace
subdirectory, not a
project
subdirectory. 3. Current Configuration: The default workspace mount path in the codebase remains
/workspace
as defined by
DEFAULT_WORKSPACE_MOUNT_PATH_IN_SANDBOX = '/workspace'
in
openhands/core/config/config_utils.py
. 4. Runtime Environment Discrepancy: However, in the current runtime environment, I observed these environment variables: ◦
WORKSPACE_BASE=/workspace/project
◦
WORKSPACE_MOUNT_PATH_IN_SANDBOX=/workspace/project
This suggests the
/workspace/project
configuration is being set at the deployment/runtime level, not in the OpenHands source code itself. 5. Repository Cloning Logic: The repository cloning logic in
openhands/runtime/base.py
extracts the repo name from the URL (e.g., "OpenHands" from "All-Hands-AI/OpenHands") and clones it directly into the workspace, which would create
/workspace/project/OpenHands
if the workspace base is
/workspace/project
. Conclusion: The agent failures you're observing are likely due to a runtime/deployment configuration that sets the workspace to
/workspace/project
, creating a mismatch between where agents expect to find repositories (
/workspace/{repo_name}
) and where they're actually located (
/workspace/project/{repo_name}
). This configuration change was not made in the OpenHands source code but appears to be set at the environment/deployment level.
Investigation Summary: OpenHands Workspace Directory Structure Answer to your question: No, there was no recent change from
/workspace/{repo_name}
to
/workspace/project/{repo_name}
as the default directory structure in the OpenHands codebase. Key Findings: 1. No Code Changes to
/workspace/project
: After thoroughly searching the entire OpenHands codebase, I found no evidence of a systematic change to use
/workspace/project
as the default workspace structure. The only mentions of "project" in workspace contexts are in test files using example paths like
/home/user/project
. 2. Actual Historical Change (May 2024): There was a significant workspace-related change in commit
b3a45ed7f
from May 16, 2024, but it changed the default
workspace_base
from
os.getcwd()
to
os.path.join(os.getcwd(), 'workspace')
- meaning it added a
workspace
subdirectory, not a
project
subdirectory. 3. Current Configuration: The default workspace mount path in the codebase remains
/workspace
as defined by
DEFAULT_WORKSPACE_MOUNT_PATH_IN_SANDBOX = '/workspace'
in
openhands/core/config/config_utils.py
. 4. Runtime Environment Discrepancy: However, in the current runtime environment, I observed these environment variables: ◦
WORKSPACE_BASE=/workspace/project
◦
WORKSPACE_MOUNT_PATH_IN_SANDBOX=/workspace/project
This suggests the
/workspace/project
configuration is being set at the deployment/runtime level, not in the OpenHands source code itself. 5. Repository Cloning Logic: The repository cloning logic in
openhands/runtime/base.py
extracts the repo name from the URL (e.g., "OpenHands" from "All-Hands-AI/OpenHands") and clones it directly into the workspace, which would create
/workspace/project/OpenHands
if the workspace base is
/workspace/project
. Conclusion: The agent failures you're observing are likely due to a runtime/deployment configuration that sets the workspace to
/workspace/project
, creating a mismatch between where agents expect to find repositories (
/workspace/{repo_name}
) and where they're actually located (
/workspace/project/{repo_name}
). This configuration change was not made in the OpenHands source code but appears to be set at the environment/deployment level.
Investigation Summary: OpenHands Workspace Directory Structure Answer to your question: No, there was no recent change from
/workspace/{repo_name}
to
/workspace/project/{repo_name}
as the default directory structure in the OpenHands codebase. Key Findings: 1. No Code Changes to
/workspace/project
: After thoroughly searching the entire OpenHands codebase, I found no evidence of a systematic change to use
/workspace/project
as the default workspace structure. The only mentions of "project" in workspace contexts are in test files using example paths like
/home/user/project
. 2. Actual Historical Change (May 2024): There was a significant workspace-related change in commit
b3a45ed7f
from May 16, 2024, but it changed the default
workspace_base
from
os.getcwd()
to
os.path.join(os.getcwd(), 'workspace')
- meaning it added a
workspace
subdirectory, not a
project
subdirectory. 3. Current Configuration: The default workspace mount path in the codebase remains
/workspace
as defined by
DEFAULT_WORKSPACE_MOUNT_PATH_IN_SANDBOX = '/workspace'
in
openhands/core/config/config_utils.py
. 4. Runtime Environment Discrepancy: However, in the current runtime environment, I observed these environment variables: ◦
WORKSPACE_BASE=/workspace/project
◦
WORKSPACE_MOUNT_PATH_IN_SANDBOX=/workspace/project
This suggests the
/workspace/project
configuration is being set at the deployment/runtime level, not in the OpenHands source code itself. 5. Repository Cloning Logic: The repository cloning logic in
openhands/runtime/base.py
extracts the repo name from the URL (e.g., "OpenHands" from "All-Hands-AI/OpenHands") and clones it directly into the workspace, which would create
/workspace/project/OpenHands
if the workspace base is
/workspace/project
. Conclusion: The agent failures you're observing are likely due to a runtime/deployment configuration that sets the workspace to
/workspace/project
, creating a mismatch between where agents expect to find repositories (
/workspace/{repo_name}
) and where they're actually located (
/workspace/project/{repo_name}
). This configuration change was not made in the OpenHands source code but appears to be set at the environment/deployment level.