Skip to content

[FEATURE]: Configurable command timeout in config.json #3950

Closed as not planned

Description

@JosXa
  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

The current 1-minute command timeout is too short for integration tests and other long-running operations. When running integration tests that may take longer than 1 minute, the timeout causes premature termination of commands.

Proposed Solution: Add a command_timeout setting to config.json that allows users to specify custom timeout duration.

Use Cases:

  • Integration tests that take longer than 1 minute
  • Build processes that require extended time
  • Database migrations or other long-running operations
  • CI/CD pipelines with extended execution times

Benefits:

  • Flexibility for different project requirements
  • Better support for long-running operations
  • Improved developer experience for integration testing
  • Maintains backward compatibility with existing setups

Activity

  1. github-actions commented on Nov 5, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Nov 5, 2025

    @rekram1-node
    Contributor

    @JosXa that's just the default timeout the agent can set it up to 10min currently. But yeah we could add an experimental setting for this I think tools + permissions are going to be tweaked in the config so I'd prefer making an experimental flag for now until we have a better hierachy

  3. JosXa commented on Nov 9, 2025

    @JosXa
    ContributorAuthor

    You're right, I can tell it explicitly to use a specific timeout 👍 Something to know, or maybe document

  4. strk commented on Nov 14, 2025

    @strk

    You're right, I can tell it explicitly to use a specific timeout 👍 Something to know, or maybe document

    I'm having this problem at the /init stage, are you saying I can ask the model to raise the timeout BEFORE issuing the /init command ? It would indeed be useful to document how to change the timeout.

  5. strk commented on Nov 14, 2025

    @strk

    @JosXa that's just the default timeout the agent can set it up to 10min currently.

    How ?

  6. JosXa commented on Nov 14, 2025

    @JosXa
    ContributorAuthor

    @strk Haven't tried, but intuitively I'd expect this to work:

    "Whenever running terminal commands, use a timeout of 10 minutes.
    /init"

  7. rekram1-node commented on Nov 14, 2025

    @rekram1-node
    Contributor

    @strk when the model calls bash commands there is an optional field for it to set a timeout, it can dynamically set that anytime it calls the tool.

  8. abda11ah commented on Nov 27, 2025

    @abda11ah

    Hi, how to remove this timeout ?

    The long running terminal commands are kicked after 60s

    Please help

  9. rekram1-node commented on Nov 27, 2025

    @rekram1-node
    Contributor

    ill add some config for it but for now @abda11ah just tell the llm to give it a higher timeout when it runs it

  10. JosXa commented on Nov 28, 2025

    @JosXa
    ContributorAuthor

    @rekram1-node I noticed that the LLMs don't really get the idea that they can increase their command timeout parameter when it does time out. Could we add a note to the "this command expired" error that LLMs see along the lines of:
    "This command timed out. If you believe that it just needs more time to complete and did not stuck in an interactive shell, feel free to increase the timeout parameter" (or whatever it's named). This way, we could even reduce the default to like 15 or 30 seconds and let it retry with a higher timeout when needed. It dropping into an interactive command would then not be such a big impact to total duration of the task.

  11. rekram1-node commented on Dec 1, 2025

    @rekram1-node
    Contributor

    Yeah we could/should update the error message if the llms aren't listening good idea

  12. self-assigned this
    on Dec 1, 2025
  13. rekram1-node commented on Dec 9, 2025

    @rekram1-node
    Contributor

    we will have something more appropriate in the config later, for now we will have:
    OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT (supported in next release also this is in milliseconds)

  14. peter-mw commented on Mar 8, 2026

    @peter-mw

    Any news on merging this ?

  15. github-actions commented on May 8, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions