Skip to content

feat(spawn): let a session set its own model and effort, and close itself on self - #944

Merged
omartelo merged 1 commit into
mainfrom
feat/self-model-and-close
Oct 27, 2026
Merged

omartelo merged 1 commit into
mainfrom
feat/self-model-and-close

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

Summary

  • control_session now accepts model and effort with the caller's own session as the target. Both only change what the session's next requests carry, so the asking turn survives them. abort, prompt and slash commands on the caller stay refused, since they cannot work there.
  • close_session gains self (lich close --self), which lifts the refusal to close the session the call runs in. The tool description reserves it for a user who asked; nothing verifies that, and docs/ceilings.md says so.
  • CloseSessionOptions gains self; api/testdata/contract.golden regenerated because the contract moved.

Test plan

  • TestControlSetsTheCallersOwnModelAndEffort: model and effort reach the caller.
  • TestCloseTakesDownTheCallerWhenToldSelf: the caller is parked and its terminal closed with self.
  • The existing refusals (abort on self, close of self without self) still hold.
  • Local gate: gofmt, go vet ./..., go test ./... green.

…self on self

control_session took model and effort on any Claude Code session but the
caller's own, though both only change what the next requests carry and the
asking turn survives them. close_session refused the caller outright, leaving
the user no way to have an agent close its own session. model and effort now
reach the caller; close_session (lich close --self) closes it when told self,
which the tool description reserves for a user who asked.
@omartelo
omartelo merged commit 5cf4df3 into main Oct 27, 2026
7 checks passed
@omartelo
omartelo deleted the feat/self-model-and-close branch October 27, 2026 01:10
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.

1 participant