Passing combined context inline as a CLI arg hits Linux ARG_MAX (~2 MB) when project CONTEXT.md or MEMORY.md are large. Three changes: 1. Write combined_context to a mktemp file and pass via --append-system-prompt-file instead of the inline --append-system-prompt arg. 2. Drop exec in favour of a subprocess call so the EXIT trap fires after claude exits, properly resetting the WezTerm theme and cleaning up the temp file. (With exec, bash is replaced immediately and traps never fire on success — WezTerm reset was silently broken.) 3. Warn when context exceeds 150 KB and show context size (in KB) on the launch line and in dryrun output, so oversized CONTEXT.md files are visible before they become a crash.
15 KiB
Executable File
15 KiB
Executable File