Skip to content

feat: Add /autonomous command for swarm-based autonomous coding#1

Open
ten-jampa wants to merge 3 commits into
mainfrom
autonomous-feature
Open

feat: Add /autonomous command for swarm-based autonomous coding#1
ten-jampa wants to merge 3 commits into
mainfrom
autonomous-feature

Conversation

@ten-jampa

Copy link
Copy Markdown
Owner

Summary

This PR adds the /autonomous command for Hermes, enabling autonomous coding mode where Hermes spawns a swarm of GSD-powered Codex agents to execute tasks.

Changes

  1. hermes_cli/commands.py - Add CommandDef for /autonomous
  2. cli.py - Add _handle_autonomous_command() with subcommands
  3. gateway/run.py - Add handler for Telegram
  4. hermes_cli/autonomous.py - Core module

Usage

/autonomous <task-description>

Will ask clarifying questions, then execute via swarm.


Built with Hermes Autonomous Mode

- Add /autonomous command to COMMAND_REGISTRY
- Add CLI handler in cli.py with subcommands (status, logs, list)
- Add Gateway handler for Telegram support
- Add hermes_cli/autonomous.py with:
  - Run ID generation
  - Run directory management
  - Vault sync functions
  - Codex swarm prompt builder
  - PR submission helpers

This is the foundation for autonomous coding mode where Hermes
spawns a swarm of GSD-powered Codex agents to execute tasks.
@github-actions

Copy link
Copy Markdown

⚠️ Supply Chain Risk Detected

This PR contains patterns commonly associated with supply chain attacks. This does not mean the PR is malicious — but these patterns require careful human review before merging.

⚠️ WARNING: Install hook files modified

These files can execute code during package installation or interpreter startup.

Files:

hermes_cli/setup.py
tests/hermes_cli/test_setup.py

Automated scan triggered by supply-chain-audit. If this is a false positive, a maintainer can approve after manual review.

Full implementation:
- Add spawn_swarm() to spawn Codex agents with GSD in background
- Add check_run_status() to track running tasks
- Add run_iteration() for retry logic (max 3 retries)
- Add complete_vault_sync() for vault backup
- Add execute_autonomous_task() as main entry point
- Update CLI handler to accept --problem, --scope, --tests flags
- Update gateway handler for Telegram
- Track running processes in RUNNING_PROCESSES dict

This enables:
- Full autonomous coding mode
- Background execution
- Iteration on failure
- Vault sync

The /autonomous command now works end-to-end.
@github-actions

Copy link
Copy Markdown

⚠️ Supply Chain Risk Detected

This PR contains patterns commonly associated with supply chain attacks. This does not mean the PR is malicious — but these patterns require careful human review before merging.

⚠️ WARNING: Install hook files modified

These files can execute code during package installation or interpreter startup.

Files:

hermes_cli/setup.py
tests/hermes_cli/test_setup.py

Automated scan triggered by supply-chain-audit. If this is a false positive, a maintainer can approve after manual review.

1 similar comment
@github-actions

Copy link
Copy Markdown

⚠️ Supply Chain Risk Detected

This PR contains patterns commonly associated with supply chain attacks. This does not mean the PR is malicious — but these patterns require careful human review before merging.

⚠️ WARNING: Install hook files modified

These files can execute code during package installation or interpreter startup.

Files:

hermes_cli/setup.py
tests/hermes_cli/test_setup.py

Automated scan triggered by supply-chain-audit. If this is a false positive, a maintainer can approve after manual review.

Issue NousResearch#2869: Session history not persisting between restarts

Root cause: The /resume command was registered but not implemented
as a slash command - only worked via --resume CLI flag.

Changes:
1. Add /resume slash command handler in cli.py
   - Lists available sessions when used without args
   - Resumes specified session and loads history from DB

2. Improve /history command
   - Loads history from database if not in current session
   - Shows saved sessions when no history available

3. Fix NoneType crash in session listing
   - Handle explicitly null title to prevent 'NoneType is not subscriptable'
   - Applied to both /resume and /history handlers
@ten-jampa ten-jampa force-pushed the autonomous-feature branch from d588e7c to 91ec166 Compare March 25, 2026 00:48
@github-actions

Copy link
Copy Markdown

⚠️ Supply Chain Risk Detected

This PR contains patterns commonly associated with supply chain attacks. This does not mean the PR is malicious — but these patterns require careful human review before merging.

⚠️ WARNING: Install hook files modified

These files can execute code during package installation or interpreter startup.

Files:

hermes_cli/setup.py
tests/hermes_cli/test_setup.py

Automated scan triggered by supply-chain-audit. If this is a false positive, a maintainer can approve after manual review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant