Context. We integrate Amplifier into a terminal-manager app (freshell, see danshapiro/freshell#514) that spawns amplifier in PTY panes and needs to know which session each spawned process owns (for resume, busy indicators, and session listing).
Problem. There is currently no way for the launcher to assign or discover the session ID at spawn (tested on amplifier 2026.07.06-7ec5dcd, core 1.6.0):
- No
--session-id/--id flag on amplifier or amplifier run (interactive or single-shot chat mode).
- No
AMPLIFIER_SESSION_ID env var is read or exported.
- The session ID appears in the startup banner, but scraping styled TUI output is not a contract.
- On-disk discovery is unreliable for correlation: the session directory is created lazily at the first prompt submit (not at process start), so directory creation order can invert process spawn order when multiple sessions launch in the same project.
We currently work around this by correlating the pane's Enter keypress with new session-directory creation plus the session:config cwd — it works, but has an irreducible ambiguity window when two sessions in the same cwd submit their first prompts near-simultaneously.
Ask. Accept a caller-supplied session ID (flag and/or env var) for interactive and run modes, mirroring what amplifier-server create --session-id already supports. The plumbing appears to exist (SessionConfig.session_id; create_session_from_bundle(session_id=...)). Alternatively (or additionally), export the generated session ID to child processes / a pointer file at startup.
Context. We integrate Amplifier into a terminal-manager app (freshell, see danshapiro/freshell#514) that spawns
amplifierin PTY panes and needs to know which session each spawned process owns (for resume, busy indicators, and session listing).Problem. There is currently no way for the launcher to assign or discover the session ID at spawn (tested on
amplifier 2026.07.06-7ec5dcd, core 1.6.0):--session-id/--idflag onamplifieroramplifier run(interactive or single-shot chat mode).AMPLIFIER_SESSION_IDenv var is read or exported.We currently work around this by correlating the pane's Enter keypress with new session-directory creation plus the
session:configcwd — it works, but has an irreducible ambiguity window when two sessions in the same cwd submit their first prompts near-simultaneously.Ask. Accept a caller-supplied session ID (flag and/or env var) for interactive and
runmodes, mirroring whatamplifier-server create --session-idalready supports. The plumbing appears to exist (SessionConfig.session_id;create_session_from_bundle(session_id=...)). Alternatively (or additionally), export the generated session ID to child processes / a pointer file at startup.