Skip to content

TUI Apparently errors out with many agents #1733

Closed

Description

@arthur404dev

Version: v0.4.1 , I've migrated my modes to agents, and also did a migration of my agents to subagents like mentioned on the docs, but as I had a lot of agents with long descriptions and details I think TUI is getting a limit and crashing, here's the tail of the log generated:

{"read":true,"grep":true,"glob":true,"list":true,"bash":true,"write":false,"edit":false},"description":"Expert codebase navigator that helps developers understand and navigate large codebases by finding relevant code, mapping relationships, and providing clear navigation paths","mode":"subagent"}} mode={} plugin=[] username=arthur loaded
INFO  2025-08-08T21:51:27 +1ms service=models.dev file={} refreshing
INFO  2025-08-08T21:51:27 +3ms service=provider init
INFO  2025-08-08T21:51:27 +1ms service=provider providerID=ollama found
INFO  2025-08-08T21:51:27 +1ms service=provider providerID=openai found
INFO  2025-08-08T21:51:27 +0ms service=provider providerID=openrouter found
INFO  2025-08-08T21:51:27 +0ms service=provider providerID=anthropic found
INFO  2025-08-08T21:51:27 +0ms service=provider providerID=github-copilot found
INFO  2025-08-08T21:51:27 +3ms service=default cmd=["/home/arthur/.cache/opencode/tui/tui-3rxtw6py."] tui
INFO  2025-08-08T21:51:27 +0ms service=app name=agent registering service
INFO  2025-08-08T21:51:27 +1ms service=app name=lsp shutdown
ERROR 2025-08-08T21:51:27 +5ms service=default name=Error message=E2BIG: argument list too long, posix_spawn '/home/arthur/.cache/opencode/tui/tui-3rxtw6py.' fatal

Activity

  1. thdxr commented on Aug 9, 2025

    @thdxr
    Member

    how are you starting opencode?

  2. self-assigned this
    on Aug 9, 2025
  3. arthur404dev commented on Aug 9, 2025

    @arthur404dev
    Author

    Starting it normally, by opencode without any parameter.

    The agents were all defined globally as markdown files. Roughly 20 subagents.

    When removing the agents opencode works normally

  4. arsham commented on Aug 11, 2025

    @arsham

    I've noticed this is not related to the amount of agents, you can remove parts of an agent's prompt and it can continue working. My guess is that is due to the large concatenated prompts.

  5. arthur404dev commented on Aug 13, 2025

    @arthur404dev
    Author

    @thdxr can confirm that this happens related to the total amount of data being streamed into TUI coming from the agents, not the agent number. I've experimented with the BMAD prompt, and just one agent with 1000+ lines is enough to break opencode execution.

  6. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Collaborator

    [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

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