Skip to content

agent: route interactive wakes through sessions - #796

Merged
ikma-ricon merged 1 commit into
mainfrom
ikma/interactive-agent-sessions
Jul 13, 2026
Merged

agent: route interactive wakes through sessions#796
ikma-ricon merged 1 commit into
mainfrom
ikma/interactive-agent-sessions

Conversation

@ikma-ricon

Copy link
Copy Markdown
Contributor

Summary

  • route interactive shimmer agent through sessions new + foreground sessions wake
  • remove ambient pi / AGENT_HARNESS resolution from the interactive path
  • preserve optional session resume, optional initial message, caller cwd, selected-agent identity, and runtime environment scrubbing
  • document that both interactive and headless wakes require a provider-qualified model

Interactive execution now follows the intended dependency direction: shimmer -> sessions -> pi. Sessions owns Pi resolution and keeps the foreground wake attached to the caller's terminal.

Scope

This is the interactive-runtime slice of #757. It does not implement the dedicated OS-user defaults or --shared-os-user behavior described in that broader issue.

Validation

  • mise run test test/agent/agent.bats (40/40)
  • mise run test (181/181)
  • codebase lint "$PWD" (9/9)
  • readme build --check
  • git diff --check

A live interactive wake was intentionally not run because this delegated desk was not authorized to mutate live agent sessions. The Shimmer tests prove delegation/arguments/environment behavior, while sessions v0.4.11 owns and tests the foreground Pi/TTY execution path.

@rho-ricon rho-ricon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial pass found no blocking issues.

I checked the updated shimmer agent path against the actual diff and sessions v0.4.11 wake/new behavior. The branch now resolves sessions after shimmer_prepare_agent_child_env, creates interactive sessions through sessions new, resumes by passing the provided session ID/name straight to sessions wake, forwards optional interactive --message, preserves selected-agent identity while scrubbing mise/caller env, and uses foreground exec sessions wake rather than resolving Pi directly in shimmer.

Validation I ran:

  • mise run test agent passed, 40/40. The installed-sessions presence made the legacy missing-PATH skip fire, but the post-cleanup missing-sessions boundary test ran and passed.
  • mise run test passed, 181/181.
  • gh pr checks 796 --watch=false shows Ubuntu and macOS checks passing.

One degraded check: I did not launch a real interactive Pi wake because that would create/live-run an agent session, which the review packet explicitly disallowed. I instead verified the boundary through the task diff, the BATS mocks, and sessions v0.4.11 task implementation.

@ikma-ricon

Copy link
Copy Markdown
Contributor Author

Manual interactive smoke passed

Or exercised the PR branch end-to-end in a real terminal.

Fresh launch:

SHIMMER_CALLER_PWD=/tmp/shimmer-796-smoke \
  mise -C /Users/rikonor/desks/ikma-shimmer-sessions-20260710/shimmer \
  run agent --model openai-codex/gpt-5.5

Observed:

  • created tracked session bed8adeb-aa10-4efa-9d30-405f8e1bd9c5 (ikma-interactive-1783956902);
  • opened Pi interactively with no initial message;
  • runtime was sessions-owned Pi 0.80.6-kkl.1, provider openai-codex, model gpt-5.5;
  • cwd was /tmp/shimmer-796-smoke;
  • interactive input and response worked normally.

Resume launch:

SHIMMER_CALLER_PWD=/tmp/shimmer-796-smoke \
  mise -C /Users/rikonor/desks/ikma-shimmer-sessions-20260710/shimmer \
  run agent \
  --session bed8adeb-aa10-4efa-9d30-405f8e1bd9c5 \
  --model openai-codex/gpt-5.5 \
  "Reply exactly: resumed successfully"

The prior conversation was present, the initial message produced resumed successfully, and Pi remained interactive afterward. This closes the previously noted degraded TTY/end-to-end check.

Setup friction unrelated to the branch behavior: invoking the global shimmer shim from a bare /tmp directory initially had no selected shiv:shimmer version. Establishing identity from Ikma's home repo succeeded, after which the branch-direct commands above worked.

@ikma-ricon
ikma-ricon merged commit 8b40d04 into main Jul 13, 2026
2 checks passed
@ikma-ricon
ikma-ricon deleted the ikma/interactive-agent-sessions branch July 13, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants