# kaish Known Limitations
## Intentionally Missing
| Shell brace expansion `{a,b,c}` | List items explicitly |
| Process substitution `<(cmd)` | `cmd > /tmp/t.txt; cmd2 /tmp/t.txt` |
| Backticks `` `cmd` `` | `$(cmd)` |
| `eval` | Write explicit code |
| Implicit word splitting on whitespace | `split "$VAR"` (for-loop `$(cmd)` does split on newlines — see Bash vs kaish below) |
`[ ]` is supported as a builtin but `[[ ]]` is preferred.
## Lexer/Parser Limitations
| `[[ ]]` parsed as two brackets | Two separate `[` tokens, not a compound keyword | Works for tests; kaish will never have `[]` array syntax |
| Keywords as bare arguments | `echo done` may fail because `done` is a keyword token | Quote: `echo "done"` |
## Builtin Constraints
| `alias` | First word only; not in pipelines or compound commands |
| `set` | `-e`, `-o latch`, `-o trash`, `-o glob` (no `-u`, `-x`, `pipefail`) |
| `rm` (trash) | Trash failure = error, no fallthrough to permanent delete. Dirs always trash (stat size unreliable). |
| `rm` (latch) | Nonces scoped to (command, paths). Subset confirmation only. 60s TTL. Persist within MCP session, not across reconnects. |
| `ps` | Linux-only (reads `/proc`) |
| `git` | Operates on real filesystem, not VFS |
| `head`/`tail -c` | Counts UTF-8 characters, not bytes |
| `**` globs | Slow on deep trees; use specific prefixes |
| `kaish-ignore` | Runtime changes don't persist across sessions; use `~/.kaishrc` or `--init` |
| `kaish-output-limit` | Runtime changes don't persist across sessions; use `~/.kaishrc` or `--init` |
## Execution
- **Pipeline stages run concurrently** with isolated scopes (like bash subshells). Variable assignments in one stage aren't visible in others. Last stage syncs back to parent.
- **User functions and .kai scripts cannot run inside pipeline stages, scatter workers, or background jobs (`&`).** Only builtins and external commands work in these contexts. Future: per-worker kernel instances.
- **Scatter results in completion order**, not input order.
- **No command substitution in redirect targets** — `cmd > $(...)` not supported. Evaluate path first.
- **Preprocessor is context-unaware** — `$(( ))` and heredoc markers replaced before parsing.
## External Commands
| No PTY assumed | TTY works if present, but kaish doesn't allocate one |
| Output buffered (non-pipeline) | Redirect to file or use in pipeline |
| Virtual cwd fails | `cd` to real directory before running |
| Bypass VFS sandbox | Set `allow_external_commands=false` to block; `exec`/`spawn` also gated |
## Bash vs kaish
| `for i in $VAR` splits on IFS | E012 validator error; use `$(split "$VAR")` |
| `for i in $(cmd)` splits on IFS (default: any whitespace) | Splits on `\n` only — `for line in $(cat file)` iterates per line; `for x in $(echo "a b c")` iterates once |
| `for i in "$(cmd)"` iterates once | Same — quoted substitution suppresses the per-line split |
| `*.txt` expands at shell | Bare globs expand (disable with `set +o glob`) |
| Regex in `=~` is unquoted | Quotes allowed: `=~ "\.rs$"` |
| `printf "a"; printf "b"` → `ab` | → `a\nb` (line-separated, intentional) |