mirror of
https://github.com/moghtech/komodo.git
synced 2026-05-06 08:55:40 -05:00
[GH-ISSUE #1289] [Bug] "execute_container_terminal" randomly fails to execute #8985
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bastienlc on GitHub (Mar 28, 2026).
Original GitHub issue: https://github.com/moghtech/komodo/issues/1289
Setting
komodo-core and komodo-periphery running 2.0.0 docker image
Assume a debian:bookworm container is running on "my-server":
I'm trying to execute a command on this container using an Action, specifically the
execute_container_terminalmethod of the typescript client. Thus from the UI I create an action with this content:Expected behavior
Using
bashorsh, executing the action succeeds and the following output is produced:Actual behavior
Sometimes the command is executed incorrectly, resulting in the following output:
I have not been able to pinpoint exactly what causes this behavior to occur, currently it seems random.
Initial analysis
While I'm not familiar with the komodo source code, the issue seems to stem from this snippet:
0f96794559/bin/periphery/src/api/terminal.rs (L466-L468)Edits
@martkaczmarek commented on GitHub (Apr 14, 2026):
Happening to me too.
Komodo periphery + core both on Docker, 2.1.2
In my case, even multiple executes across a singe action could change behavior (this is output of a single action):
My testing was done on stacks (komodo.execute_stack_exec), but same result.
@martkaczmarek commented on GitHub (Apr 14, 2026):
I'd like to point out another thing:
even when output is wrong:
The terminal actually does execute the command and returns exit code:

(this is the terminal executing the same action run)
It looks to me like Komodo is just confused as to which
__KOMODO_START_OF_OUTPUT__to treat as the actual output text - it catches the first one and returns'; date; rc=$?; printf 'which is below.--Edit after a bit more testing:
In my case, the first run in a specific terminal will result in a wrong output. But if the terminal is not recreated, the subsequent commands return proper text.
@bastienlc can you confirm that? If you change recreate value to "Never" and not delete the terminal, the second and all subsequent runs should be fine.
@mbecker20 commented on GitHub (Apr 14, 2026):
I think it should usually work if the shell is "bash", but doesn't seem to with "sh"
@bastienlc commented on GitHub (Apr 15, 2026):
@martkaczmarek I have not been able to reproduce your results:
On debian/ubuntu images
execute_container_terminalworks on the first try, and also on subsequent tries when settingrecreate: "Never"execute_container_terminalnever works, not on the first try, and not on subsequent tries when settingrecreate: "Never"On alpine images
execute_container_terminalworks on the first try, and also on subsequent tries when settingrecreate: "Never"Analysis
What I'm observing today corresponds to my initial assessment "succeeds with bash but fails with sh" on debian images. However I believe there is more to this issue, as I am seeing occasional failures with the same output when using bash:
But I'm unable to consistently reproduce these failures.
However I agree that this is a parsing issue of the terminal output, and the command is executed correctly. It still breaks functionality e.g. when using actions in procedures, the action errors out and the procedure fails.