Skip to content

[Feature]: Ability to run a shell command as a background job #2635

@tusharmath

Description

@tusharmath

1. Why Do You NEED This Feature?

ForgeCode without realizing starts the server and other long running processes using the shell tool. This is eventually triggers a timeout and the agent feels that the command failed.

2. What Is NOT Possible Right Now?

Its not possible for ForgeCode to start a webserver kind of process and move on to testing it.

3. What WILL Be Possible With This Feature?

It will allow the agent to run a shell command in the background and continue moving.

Proposed Solution (User Experience)

The shell tool should take an additional parameter: nohup: bool that should run the command using nohup in the background:

nohup <command> > /tmp/<command-date-time>.log 2>&1 &

The output of the command will be:

  1. The path of the log file
  2. The process id

The console should print the output in this format

* [00::00:00] [Spawned] npm start

CRITICAL

  • During compaction the information about the output file path will be lost and the agent might try to start the server again. Hence it is crucial to make sure that during compaction we don't loose the output file information.

Alternatives Considered

We have tried to provide specific system instructions but the agent doesn't reliably perform those operations.

Use Cases

Mentioned above.

Feature Category

Shell Plugin

Priority/Impact

High - Would significantly improve my workflow

Examples from Other Tools

No response

Implementation Ideas

No response

Contribution

  • I'm willing to submit a PR to implement this feature
  • I can help with testing
  • I can help with documentation

Additional Context

No response

✅ Pre-submission Checklist

  • I have clearly explained WHY I need this feature (not just that it would be nice)
  • I have described what is NOT currently possible in detail
  • I have explained what WILL be possible with concrete examples
  • I have provided specific use cases and workflows
  • I have searched existing issues to avoid duplicates

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureBrand new functionality, features, pages, workflows, endpoints, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions