Use pipeline() instead of finished(readable.pipe(writable)) so stream
errors from abort signals are caught as promise rejections. Increase
download timeout from 10s to 120s for multi-MB archives.
closes#2066
* feat(session-manager): allow supplying custom session ID in newSession()
Add optional `id` field to `NewSessionOptions`. When provided, this ID
is used as the session ID instead of generating a random UUID. Existing
callers are unaffected since the field is optional and falls back to
`randomUUID()`.
Closes#2097
* test(session-manager): add tests for custom session ID in newSession()
Verify that newSession() uses the provided id when supplied, falls back
to randomUUID() when omitted, and includes the custom id in the session
header.
The _isRetryableError() regex used literal spaces ("server error",
"internal error") but Codex SSE error events use underscores
("server_error"). Change to .? so both space and underscore (and
direct concatenation) are matched, enabling automatic retry on
transient Codex SSE errors.
fixes#2091
* fix(coding-agent): use supported Anthropic compaction model
The Anthropic compaction test was pinned to claude-3-7-sonnet-latest, which now fails with a 404 because that model line was retired. Switch the test to the existing claude-sonnet-4-5 convention used elsewhere in coding-agent tests.
* test(coding-agent): disable git prompts in HTTPS parsing test
The HTTPS URL parsing test intentionally clones a nonexistent GitHub repo to verify that bare HTTPS sources dispatch to git. Under a TTY, git can prompt on that path and hang the test run.
Set GIT_TERMINAL_PROMPT=0 in that test so it still exercises real git but fails fast instead of waiting for terminal input.
Adds a session_directory extension event that fires before session manager
creation, allowing extensions to customize the session directory path based
on cwd, git branch, or other context.
- Extensions can return a custom sessionDir in the event handler
- CLI --session-dir flag takes precedence over extension-provided paths
- If multiple extensions return a sessionDir, the last one wins
- Enables implementing branch-based sessions as an extension instead of core feature
This provides the extension point needed to implement git branch-based
session directories without adding the complexity to core.
Closes#1729
* feat(coding-agent): add fold/unfold to tree branch navigation
Remap left/right arrow keys in the session tree to jump between branch
segment starts (first child of each branching point). Left on a foldable
node (root or segment start) folds it, hiding its descendants. Right on
a folded node unfolds it. Nested fold state is preserved. Search and
filter changes reset all folds.
Folded branches show ⊞ in the connector (├⊞/└⊞) or as a prefix for
roots. Active path marker • appears after the fold indicator.
Add Page Up/Down support for paging through the tree list, consistent
with session selector and config selector.
* feat(coding-agent): improve tree branch folding closes#1724
---------
Co-authored-by: Sviatoslav Abakumov <dust.harvesting@gmail.com>
Only set app-level handlers on custom editors if they haven't defined
their own. This allows custom editors (e.g. vim mode) to implement
custom escape handling instead of being overwritten.
Closes#1838
Add manual retry loop (10 attempts, 20ms delay) around lockfile.lockSync()
in FileAuthStorageBackend and FileSettingsStorage. Previously, concurrent
pi processes would fail immediately on ELOCKED, causing auth.json to load
as empty and surfacing misleading 'No API key found' errors.
fixes#1871
When Kitty keyboard protocol is not available (e.g. inside tmux), fall
back to xterm modifyOtherKeys mode 2 so that Shift+Enter, Ctrl+Enter,
and other modified keys are distinguishable from plain Enter.
tmux users need to add to ~/.tmux.conf:
set -g extended-keys on
set -g extended-keys-format csi-u
closes#1872