Open
Conversation
puririshi98
added a commit
to puririshi98/nv-OpenHands
that referenced
this pull request
Feb 18, 2026
Implements Terminus, an interactive terminal session manager that enables persistent terminal sessions with state preservation for TerminalBench evaluation tasks. Follows the OpenCode/Codex agent pattern from PR sdevare-nv#11. Key features: - Persistent terminal sessions with environment and directory preservation - Interactive process support (REPLs, debuggers, interactive CLIs) - Multi-session management with isolated environments - Control sequence support (Ctrl+C, Ctrl+D, etc.) - Timeout handling and automatic cleanup - PTY-based terminal emulation Implementation includes: - 4 new action types (START, EXECUTE, INPUT, STOP) - 3 new observation types (OUTPUT, ERROR, SESSION) - Complete session manager with PTY-based implementation - LLM tool definitions for agent integration - Comprehensive test suite with all tests passing - Full documentation and usage examples This enables OpenHands to handle terminal-intensive tasks requiring persistent shell state, interactive processes, and sophisticated command execution workflows. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Convert Cline tools to work with OpenHands
As part of the implementation make a new agent in agenthub called cline_agent.
Follow the same convention used in the opencode_agent.
The tool implementation should match the tool implementation in Cline with the same description, parameters, implementation, response format, etc.
The tools can be found here - /lustre/fsw/portfolios/llmservice/users/sdevare/repos/nv-OpenHands/temp/cline/src/core/task/tools
Please note - for shell commands, please add the is_input parameter to the tool implementation and the function call.
Please note - Also match the prompts used in Cline for the system prompt, user prompt, tool descriptions, etc.
You'll need to also update the following files:
openhands/agenthub/init.py
openhands/core/schema/action.py
openhands/core/schema/observation.py
openhands/events/action/init.py
openhands/events/observation/init.py
openhands/events/serialization/action.py
openhands/events/serialization/observation.py
openhands/llm/tool_names.py
openhands/memory/conversation_memory.py
openhands/runtime/impl/action_execution/action_execution_client.py
openhands/runtime/action_execution_server.py
evaluation/benchmarks/swe_bench/run_infer.py - AGENT_CLS_TO_FAKE_USER_RESPONSE_FN
implement cline action here
openhands/events/action/cline.py
implement cline observation here
openhands/events/observation/cline.py
Add prompts to the cline_agent and match the prompts used in Cline
openhands/agenthub/client_agent/prompts/additional_info.j2
openhands/agenthub/client_agent/prompts/microagent_info.j2
openhands/agenthub/client_agent/prompts/system_prompt_long_horizon.j2
openhands/agenthub/client_agent/prompts/system_prompt.j2
openhands/agenthub/client_agent/prompts/user_prompt.j2
Test the implementation - migrate the test cases from Cline to cline_agent with full coverage.
Once the implementation is complete, write comprehensive tests for each of the tool implementation please.