You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am noticing the shell tool exec action fails to retrieve the output correctly for some complex commands.
The outputs are in fact flushed in the next command's output leading to misleading command outputs and exit-codes.
workspace_config = WorkspaceType.Host(
composio_api_key=COMPOSIO_API_KEY,
composio_base_url="'https://backend.composio.dev/api'",
environment={},
persistent=True,
)
_workspace = WorkspaceFactory.new(config=workspace_config)
# 1. works correctly for quick commands
_workspace.execute_action(
action=Action.SHELLTOOL_EXEC_COMMAND,
request_data={
'cmd': 'pwd',
},
metadata={},
)
# 2. needs to initialize wandb and print project and run_url
_workspace.execute_action(
action=Action.SHELLTOOL_EXEC_COMMAND,
request_data={
'cmd': 'python -u wandb_logging.py',
},
metadata={},
)
"""
## output isnt captured correctly and exit code is shown as 0, pwd is also incorrect
{'data': {'stdout': '',
'stderr': '',
'exit_code': 0,
'current_shell_pwd': 'Currently in '},
'error': None,
'successful': True}
"""
# 3. Next command
_workspace.execute_action(
action=Action.SHELLTOOL_EXEC_COMMAND,
request_data={
'cmd': 'echo "Hello, World!"',
},
metadata={},
)
"""
# wandb erros show up now
{'data': {'stdout': '1\n/usr/workspace\n0\nHello, World!\n',
'stderr': 'wandb: Using wandb-core as the SDK backend. Please refer to https://wandb.me/wandb-core for more information.\n2024/12/22 13:42:22 INFO wandb: stream_init: failed to fetch credentials: couldn\'t get API key: settings: failed to get API key from netrc: $HOME is not defined\nBrokenPipeError: [Errno 32] Broken pipe\n',
'exit_code': 0,
'current_shell_pwd': 'Currently in /home/harshith2794/repos/deduction-dev/notebooks/workspace'},
'error': None,
'successful': True}
"""
The text was updated successfully, but these errors were encountered:
Hi, I am noticing the shell tool exec action fails to retrieve the output correctly for some complex commands.
The outputs are in fact flushed in the next command's output leading to misleading command outputs and exit-codes.
The text was updated successfully, but these errors were encountered: