Kaimon crashes on startup on Windows (opening file "/dev/tty") #49

Closed
opened 2026-05-25 21:57:48 -07:00 by cstjean · 16 comments
cstjean commented 2026-05-25 21:57:48 -07:00 (Migrated from github.com)

Not sure if this is a Kaimon or a Tachikoma issue.

I don't think my setup is particularly exotic. The original setup worked fine, but afterwards I get this:

PS C:\Users\me> kaimon
ERROR: SystemError: opening file "/dev/tty": No such file or directory
Stacktrace:
  [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
    @ Base .\error.jl:186
  [2] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Bool, append::Nothing)
    @ Base .\iostream.jl:317
  [3] open
    @ .\iostream.jl:296 [inlined]
  [4] open(fname::String, mode::String; lock::Bool)
    @ Base .\iostream.jl:380
  [5] open
    @ .\iostream.jl:379 [inlined]
  [6] _start_stdout_capture!()
    @ Kaimon C:\Users\a1058035\.julia\packages\Kaimon\6N7iB\src\tui\io.jl:211
  [7] init!(m::Kaimon.KaimonModel, _t::Tachikoma.Terminal)
    @ Kaimon C:\Users\a1058035\.julia\packages\Kaimon\6N7iB\src\tui\lifecycle.jl:212
  [8] (::Tachikoma.var"#229#230"{Int64, Bool, Kaimon.KaimonModel, Base.RefValue{Any}, Base.RefValue{Any}, Base.RefValue{Bool}})(t::Tachikoma.Terminal)
    @ Tachikoma C:\Users\a1058035\.julia\packages\Tachikoma\vrBon\src\app.jl:1011
  [9] with_terminal(f::Tachikoma.var"#229#230"{Int64, Bool, Kaimon.KaimonModel, Base.RefValue{Any}, Base.RefValue{Any}, Base.RefValue{Bool}}; tty_out::Nothing, tty_size::Nothing, on_stdout::Nothing, on_stderr::Nothing)
    @ Tachikoma C:\Users\a1058035\.julia\packages\Tachikoma\vrBon\src\terminal.jl:1515
 [10] with_terminal
    @ C:\Users\a1058035\.julia\packages\Tachikoma\vrBon\src\terminal.jl:1493 [inlined]
 [11] app(model::Kaimon.KaimonModel; fps::Int64, default_bindings::Bool, on_stdout::Nothing, on_stderr::Nothing, tty_out::Nothing, tty_size::Nothing)
    @ Tachikoma C:\Users\a1058035\.julia\packages\Tachikoma\vrBon\src\app.jl:1010
 [12] invokelatest
    @ .\Base_compiler.jl:250 [inlined]
 [13] tui(; port::Int64, theme_name::Nothing, revise_polling::Bool, revise_mod::Nothing)
    @ Kaimon C:\Users\a1058035\.julia\packages\Kaimon\6N7iB\src\tui\lifecycle.jl:440
 [14] main(ARGS::Vector{String})
    @ Kaimon C:\Users\a1058035\.julia\packages\Kaimon\6N7iB\src\Kaimon.jl:2657
 [15] _start()
    @ Base .\client.jl:556
Not sure if this is a Kaimon or a Tachikoma issue. I don't think my setup is particularly exotic. The original setup worked fine, but afterwards I get this: ```julia PS C:\Users\me> kaimon ERROR: SystemError: opening file "/dev/tty": No such file or directory Stacktrace: [1] systemerror(p::String, errno::Int32; extrainfo::Nothing) @ Base .\error.jl:186 [2] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Bool, append::Nothing) @ Base .\iostream.jl:317 [3] open @ .\iostream.jl:296 [inlined] [4] open(fname::String, mode::String; lock::Bool) @ Base .\iostream.jl:380 [5] open @ .\iostream.jl:379 [inlined] [6] _start_stdout_capture!() @ Kaimon C:\Users\a1058035\.julia\packages\Kaimon\6N7iB\src\tui\io.jl:211 [7] init!(m::Kaimon.KaimonModel, _t::Tachikoma.Terminal) @ Kaimon C:\Users\a1058035\.julia\packages\Kaimon\6N7iB\src\tui\lifecycle.jl:212 [8] (::Tachikoma.var"#229#230"{Int64, Bool, Kaimon.KaimonModel, Base.RefValue{Any}, Base.RefValue{Any}, Base.RefValue{Bool}})(t::Tachikoma.Terminal) @ Tachikoma C:\Users\a1058035\.julia\packages\Tachikoma\vrBon\src\app.jl:1011 [9] with_terminal(f::Tachikoma.var"#229#230"{Int64, Bool, Kaimon.KaimonModel, Base.RefValue{Any}, Base.RefValue{Any}, Base.RefValue{Bool}}; tty_out::Nothing, tty_size::Nothing, on_stdout::Nothing, on_stderr::Nothing) @ Tachikoma C:\Users\a1058035\.julia\packages\Tachikoma\vrBon\src\terminal.jl:1515 [10] with_terminal @ C:\Users\a1058035\.julia\packages\Tachikoma\vrBon\src\terminal.jl:1493 [inlined] [11] app(model::Kaimon.KaimonModel; fps::Int64, default_bindings::Bool, on_stdout::Nothing, on_stderr::Nothing, tty_out::Nothing, tty_size::Nothing) @ Tachikoma C:\Users\a1058035\.julia\packages\Tachikoma\vrBon\src\app.jl:1010 [12] invokelatest @ .\Base_compiler.jl:250 [inlined] [13] tui(; port::Int64, theme_name::Nothing, revise_polling::Bool, revise_mod::Nothing) @ Kaimon C:\Users\a1058035\.julia\packages\Kaimon\6N7iB\src\tui\lifecycle.jl:440 [14] main(ARGS::Vector{String}) @ Kaimon C:\Users\a1058035\.julia\packages\Kaimon\6N7iB\src\Kaimon.jl:2657 [15] _start() @ Base .\client.jl:556 ```
BambOoxX commented 2026-06-03 04:56:57 -07:00 (Migrated from github.com)

Same here...

Same here...
BambOoxX commented 2026-06-08 04:23:33 -07:00 (Migrated from github.com)

To be precise, this seems to come from
github.com/kahliburke/Kaimon.jl@30d378d712/src/tui/io.jl (L211)
Which does not make much sense on Windows. In such a context wouldn't a

 _TUI_REAL_STDOUT[] = open(tempname(), "w")

be better ?
Which would generalize to

_TUI_REAL_STDOUT[] = iswindows() ? open(tempname(), "w") : open("/dev/tty", "w") 
To be precise, this seems to come from https://github.com/kahliburke/Kaimon.jl/blob/30d378d712f3a79d6f3266043bfae738ec5dd7d2/src/tui/io.jl#L211 Which does not make much sense on Windows. In such a context wouldn't a ```julia _TUI_REAL_STDOUT[] = open(tempname(), "w") ``` be better ? Which would generalize to ```julia _TUI_REAL_STDOUT[] = iswindows() ? open(tempname(), "w") : open("/dev/tty", "w") ```
kahliburke commented 2026-06-08 23:05:23 -07:00 (Migrated from github.com)

Unfortunately I don't use Windows and don't have a good testing environment. I appreciate the bug report and will investigate. But I likely need some assistance in testing any fixes. Of course PRs which have been tested in Windows independently would be appreciated.

Unfortunately I don't use Windows and don't have a good testing environment. I appreciate the bug report and will investigate. But I likely need some assistance in testing any fixes. Of course PRs which have been tested in Windows independently would be appreciated.
cstjean commented 2026-06-08 23:18:25 -07:00 (Migrated from github.com)

I appreciate it! To be transparent, I was eager to try out Kaimon, but now julia-mcp has proven sufficient, so I wouldn't be a good test user at this time. Maybe @BambOoxX ?

I appreciate it! To be transparent, I was eager to try out Kaimon, but now `julia-mcp` has proven sufficient, so I wouldn't be a good test user at this time. Maybe @BambOoxX ?
BambOoxX commented 2026-06-12 10:02:57 -07:00 (Migrated from github.com)

I'm fully discovering this world, so I'm not sure I would be the perfect beta tester, but I can try.
@kahliburke Are there any caveats to dev Kaimon ? I've just followed the steps of the documentation to set it up, but contributing might be trickier.

I'm fully discovering this world, so I'm not sure I would be the perfect beta tester, but I can try. @kahliburke Are there any caveats to `dev` Kaimon ? I've just followed the steps of the documentation to set it up, but contributing might be trickier.
kahliburke commented 2026-06-14 05:41:38 -07:00 (Migrated from github.com)

@BambOoxX not really, it's a standard Julia package and follows the conventions. The only thing a little less common which I've used is the Julia 'app' system which allows installing the script to start the TUI. You can dev the app as well with ]app dev ....

If there's something I can assist with let me know.

@BambOoxX not really, it's a standard Julia package and follows the conventions. The only thing a little less common which I've used is the Julia 'app' system which allows installing the script to start the TUI. You can dev the app as well with `]app dev ...`. If there's something I can assist with let me know.
kahliburke commented 2026-06-14 05:43:04 -07:00 (Migrated from github.com)

@cstjean I've read that recent updates to VSCode have included kitty terminal support, which might be one possible thing to try, if you find the interest. Also, I recommend WSL as this stuff likely works great in that environment too.

@cstjean I've read that recent updates to VSCode have included kitty terminal support, which might be one possible thing to try, if you find the interest. Also, I recommend WSL as this stuff likely works great in that environment too.
kahliburke commented 2026-06-19 16:33:40 -07:00 (Migrated from github.com)

Fixed. _start_stdout_capture! now opens CON on Windows instead of /dev/tty (src/tui/io.jl) — that's exactly the call in your stacktrace, so this crash is resolved on 2.0-integration.

Full Windows support has a couple more pieces (the ZMQ ipc://→TCP switch), which are done and tracked in the umbrella issue #41 — that's where Windows verification will continue. Closing this one as the specific /dev/tty crash is fixed. Thanks for the clear report!

Fixed. `_start_stdout_capture!` now opens `CON` on Windows instead of `/dev/tty` (`src/tui/io.jl`) — that's exactly the call in your stacktrace, so this crash is resolved on `2.0-integration`. Full Windows support has a couple more pieces (the ZMQ `ipc://`→TCP switch), which are done and tracked in the umbrella issue #41 — that's where Windows verification will continue. Closing this one as the specific `/dev/tty` crash is fixed. Thanks for the clear report!
franckgaga commented 2026-06-25 06:42:27 -07:00 (Migrated from github.com)

Hello!

It seems that the issue is not resolved. I tried to run the app on Windows 11 and it returns this error:

PS C:\Users\francis.gagnon> kaimon
ERROR: SystemError: opening file "/dev/tty": No such file or directory
Stacktrace:
  [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
    @ Base .\error.jl:186
  [2] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Bool, append::Nothing)
    @ Base .\iostream.jl:317
  [3] open
    @ .\iostream.jl:296 [inlined]
  [4] open(fname::String, mode::String; lock::Bool)
    @ Base .\iostream.jl:380
  [5] open
    @ .\iostream.jl:379 [inlined]
  [6] _start_stdout_capture!()
    @ Kaimon C:\Users\francis.gagnon\.julia\packages\Kaimon\6N7iB\src\tui\io.jl:211
  [7] init!(m::Kaimon.KaimonModel, _t::Tachikoma.Terminal)
    @ Kaimon C:\Users\francis.gagnon\.julia\packages\Kaimon\6N7iB\src\tui\lifecycle.jl:212
  [8] (::Tachikoma.var"#229#230"{Int64, Bool, Kaimon.KaimonModel, Base.RefValue{Any}, Base.RefValue{Any}, Base.RefValue{Bool}})(t::Tachikoma.Terminal)
    @ Tachikoma C:\Users\francis.gagnon\.julia\packages\Tachikoma\35crv\src\app.jl:1011
  [9] with_terminal(f::Tachikoma.var"#229#230"{Int64, Bool, Kaimon.KaimonModel, Base.RefValue{Any}, Base.RefValue{Any}, Base.RefValue{Bool}}; tty_out::Nothing, tty_size::Nothing, on_stdout::Nothing, on_stderr::Nothing)
    @ Tachikoma C:\Users\francis.gagnon\.julia\packages\Tachikoma\35crv\src\terminal.jl:1515
 [10] with_terminal
    @ C:\Users\francis.gagnon\.julia\packages\Tachikoma\35crv\src\terminal.jl:1493 [inlined]
 [11] app(model::Kaimon.KaimonModel; fps::Int64, default_bindings::Bool, on_stdout::Nothing, on_stderr::Nothing, tty_out::Nothing, tty_size::Nothing)
    @ Tachikoma C:\Users\francis.gagnon\.julia\packages\Tachikoma\35crv\src\app.jl:1010
 [12] invokelatest
    @ .\Base_compiler.jl:250 [inlined]
 [13] tui(; port::Int64, theme_name::Nothing, revise_polling::Bool, revise_mod::Nothing)
    @ Kaimon C:\Users\francis.gagnon\.julia\packages\Kaimon\6N7iB\src\tui\lifecycle.jl:440
 [14] main(ARGS::Vector{String})
    @ Kaimon C:\Users\francis.gagnon\.julia\packages\Kaimon\6N7iB\src\Kaimon.jl:2657
 [15] _start()
    @ Base .\client.jl:556

Thanks!

Hello! It seems that the issue is not resolved. I tried to run the app on Windows 11 and it returns this error: ``` PS C:\Users\francis.gagnon> kaimon ERROR: SystemError: opening file "/dev/tty": No such file or directory Stacktrace: [1] systemerror(p::String, errno::Int32; extrainfo::Nothing) @ Base .\error.jl:186 [2] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Bool, append::Nothing) @ Base .\iostream.jl:317 [3] open @ .\iostream.jl:296 [inlined] [4] open(fname::String, mode::String; lock::Bool) @ Base .\iostream.jl:380 [5] open @ .\iostream.jl:379 [inlined] [6] _start_stdout_capture!() @ Kaimon C:\Users\francis.gagnon\.julia\packages\Kaimon\6N7iB\src\tui\io.jl:211 [7] init!(m::Kaimon.KaimonModel, _t::Tachikoma.Terminal) @ Kaimon C:\Users\francis.gagnon\.julia\packages\Kaimon\6N7iB\src\tui\lifecycle.jl:212 [8] (::Tachikoma.var"#229#230"{Int64, Bool, Kaimon.KaimonModel, Base.RefValue{Any}, Base.RefValue{Any}, Base.RefValue{Bool}})(t::Tachikoma.Terminal) @ Tachikoma C:\Users\francis.gagnon\.julia\packages\Tachikoma\35crv\src\app.jl:1011 [9] with_terminal(f::Tachikoma.var"#229#230"{Int64, Bool, Kaimon.KaimonModel, Base.RefValue{Any}, Base.RefValue{Any}, Base.RefValue{Bool}}; tty_out::Nothing, tty_size::Nothing, on_stdout::Nothing, on_stderr::Nothing) @ Tachikoma C:\Users\francis.gagnon\.julia\packages\Tachikoma\35crv\src\terminal.jl:1515 [10] with_terminal @ C:\Users\francis.gagnon\.julia\packages\Tachikoma\35crv\src\terminal.jl:1493 [inlined] [11] app(model::Kaimon.KaimonModel; fps::Int64, default_bindings::Bool, on_stdout::Nothing, on_stderr::Nothing, tty_out::Nothing, tty_size::Nothing) @ Tachikoma C:\Users\francis.gagnon\.julia\packages\Tachikoma\35crv\src\app.jl:1010 [12] invokelatest @ .\Base_compiler.jl:250 [inlined] [13] tui(; port::Int64, theme_name::Nothing, revise_polling::Bool, revise_mod::Nothing) @ Kaimon C:\Users\francis.gagnon\.julia\packages\Kaimon\6N7iB\src\tui\lifecycle.jl:440 [14] main(ARGS::Vector{String}) @ Kaimon C:\Users\francis.gagnon\.julia\packages\Kaimon\6N7iB\src\Kaimon.jl:2657 [15] _start() @ Base .\client.jl:556 ``` Thanks!
kahliburke commented 2026-06-26 11:38:13 -07:00 (Migrated from github.com)

@franckgaga We're working on the 2.0 release, could you take a look at the 2.0-integration branch?

@franckgaga We're working on the 2.0 release, could you take a look at the 2.0-integration branch?
franckgaga commented 2026-06-30 08:35:01 -07:00 (Migrated from github.com)

@kahliburke just tried to install it and it seems there is a conflict in the various Project.toml files:

(@v1.12) pkg> add Kaimon#2.0-integration
    Updating git-repo `https://github.com/kahliburke/Kaimon.jl.git`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package KaimonGate [5ee84a8c]:
 KaimonGate [5ee84a8c] log:
 ├─KaimonGate [5ee84a8c] has no known versions!
 └─restricted to versions 0.1 by Kaimon [d3856c55]  no versions left
   └─Kaimon [d3856c55] log:
     ├─possible versions are: 1.3.1 or uninstalled
     └─Kaimon [d3856c55] is fixed to version 1.3.1
@kahliburke just tried to install it and it seems there is a conflict in the various `Project.toml` files: ```julia (@v1.12) pkg> add Kaimon#2.0-integration Updating git-repo `https://github.com/kahliburke/Kaimon.jl.git` Resolving package versions... ERROR: Unsatisfiable requirements detected for package KaimonGate [5ee84a8c]: KaimonGate [5ee84a8c] log: ├─KaimonGate [5ee84a8c] has no known versions! └─restricted to versions 0.1 by Kaimon [d3856c55] — no versions left └─Kaimon [d3856c55] log: ├─possible versions are: 1.3.1 or uninstalled └─Kaimon [d3856c55] is fixed to version 1.3.1 ```
kahliburke commented 2026-06-30 10:44:24 -07:00 (Migrated from github.com)

@franckgaga Thanks I'll fix

@franckgaga Thanks I'll fix
kahliburke commented 2026-06-30 11:41:02 -07:00 (Migrated from github.com)

While in development mode here, you should use dev instead of add. This is because KaimonGate uses [sources] in the Project.toml to resolve the Kaimon code it's developed against. So, two ways:

  1. Clone the branch, then dev the path:
git clone -b 2.0-integration
https://github.com/kahliburke/Kaimon.jl.git
pkg> dev /path/to/Kaimon.jl
  1. Let dev clone it, then switch branches in the dev dir:
  pkg> dev Kaimon          # clones default branch to ~/.julia/dev/Kaimon
  cd ~/.julia/dev/Kaimon && git checkout 2.0-integration
  pkg> resolve             # re-resolve against the now-checked-out branch
While in development mode here, you should use `dev` instead of `add`. This is because KaimonGate uses [sources] in the Project.toml to resolve the Kaimon code it's developed against. So, two ways: 1. Clone the branch, then dev the path: ``` git clone -b 2.0-integration https://github.com/kahliburke/Kaimon.jl.git pkg> dev /path/to/Kaimon.jl ``` 2. Let dev clone it, then switch branches in the dev dir: ``` pkg> dev Kaimon # clones default branch to ~/.julia/dev/Kaimon cd ~/.julia/dev/Kaimon && git checkout 2.0-integration pkg> resolve # re-resolve against the now-checked-out branch ```
kahliburke commented 2026-06-30 11:41:50 -07:00 (Migrated from github.com)

@franckgaga These are minor pains just pre 2.0 release, it will be streamlined soon. Thanks for your patience in the meantime.

@franckgaga These are minor pains just pre 2.0 release, it will be streamlined soon. Thanks for your patience in the meantime.
franckgaga commented 2026-06-30 11:57:13 -07:00 (Migrated from github.com)

While in development mode here, you should use dev instead of add. This is because KaimonGate uses [sources] in the Project.toml to resolve the Kaimon code it's developed against. So, two ways:

  1. Clone the branch, then dev the path:
git clone -b 2.0-integration
https://github.com/kahliburke/Kaimon.jl.git
pkg> dev /path/to/Kaimon.jl
  1. Let dev clone it, then switch branches in the dev dir:
  pkg> dev Kaimon          # clones default branch to ~/.julia/dev/Kaimon
  cd ~/.julia/dev/Kaimon && git checkout 2.0-integration
  pkg> resolve             # re-resolve against the now-checked-out branch

Ok I was able to make to install the version of the branch with the second solution. And the ERROR: SystemError: opening file "/dev/tty": No such file or directory issue is solved on this branch. Thanks!

> While in development mode here, you should use `dev` instead of `add`. This is because KaimonGate uses [sources] in the Project.toml to resolve the Kaimon code it's developed against. So, two ways: > > 1. Clone the branch, then dev the path: > > > ``` > git clone -b 2.0-integration > https://github.com/kahliburke/Kaimon.jl.git > pkg> dev /path/to/Kaimon.jl > ``` > > 2. Let dev clone it, then switch branches in the dev dir: > > > ``` > pkg> dev Kaimon # clones default branch to ~/.julia/dev/Kaimon > cd ~/.julia/dev/Kaimon && git checkout 2.0-integration > pkg> resolve # re-resolve against the now-checked-out branch > ``` Ok I was able to make to install the version of the branch with the second solution. And the `ERROR: SystemError: opening file "/dev/tty": No such file or directory` issue is solved on this branch. Thanks!
kahliburke commented 2026-06-30 12:24:48 -07:00 (Migrated from github.com)

@franckgaga great, I will close for now, but feel free to open a new issue if you run into any related problems. Also 2.0 should be released in the near future and any feedback you have on that once it lands is appreciated.

@franckgaga great, I will close for now, but feel free to open a new issue if you run into any related problems. Also 2.0 should be released in the near future and any feedback you have on that once it lands is appreciated.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kahliburke/Kaimon.jl#49
No description provided.