> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/prd/phase_41/session_10_claude_code_execution.md).

# Session 10: Claude Code Execution

**Session ID**: `phase41-session10-claude-code-execution` **Status**: Not Started **Estimated Tasks**: \~12-25 **Estimated Duration**: 2-4 hours

***

## Objective

Provide real Claude Code workspace, shell, git, process, and file/write execution wherever the product exposes those capabilities.

***

## Scope

### In Scope (MVP)

* Update Claude Code route and Mission Control page behavior.
* Add or connect token-gated local bridge routes for workspace, shell, git, process, and file read/write actions where those capabilities are exposed.
* Preserve loopback, token, production, demo/privacy, credential, and dependency boundaries as named recovery states.
* Replace descriptive-only placeholders with real executable paths or remove shipped capability claims.
* Update route, component, bridge, and e2e tests.

### Out of Scope

* Broader local-agent contract cleanup owned by Session 11.

***

## Prerequisites

* [ ] Session 01 local access policy is complete.
* [ ] Session 03 shared Hermes access semantics are complete.

***

## Deliverables

1. Claude Code execution paths with visible command, file, process, workspace, and git results.
2. Failed-action recovery details for real dependency and safety failures.
3. Tests proving real execution and recovery paths.

***

## Success Criteria

* [ ] Exposed workspace, shell, git, process, and file/write capabilities execute end to end.
* [ ] Claude Code pages no longer render legacy limited local labels for shipped live execution.
* [ ] Tests fail on descriptive-only placeholders, mock-only success, or manual disabled local defaults.

***

## Folded Handoff Session Details

The following session-specific details were migrated from the former ongoing-projects handoff. They preserve the original objective, scope, outputs, dependencies, notes, and acceptance checks for this session.

#### Session 10: Claude Code Execution

**Objective**: Provide real Claude Code workspace, shell, git, process, and file/write execution wherever the product exposes those capabilities.

**Scope**:

* Update `src/routes/agents.claude-code.tsx` and `src/components/hermes/claude-code-mission-page.tsx` so Mission Control exposes executable local actions instead of read-only or descriptive placeholders.
* Add or connect bridge routes for workspace, shell, git, process, and file/write execution where the page claims those capabilities.
* Implement the Claude Code bridge API in this session using the Vite local middleware pattern: workspace read/write, shell command, git command, process start/stop/status, and file read/write actions must all return structured visible results and recovery details.
* Preserve loopback, same-run-token, production, demo/privacy, credential, and dependency boundaries as named recovery states.
* Replace any Claude Code descriptive-only placeholder with a real executable path in this session.
* Update Claude Code route, component, bridge, and e2e tests.

**Outputs**:

* Claude Code execution paths with visible command/file/process results and failed-action recovery details.
* Mission Control copy that no longer relies on read-only hosted/demo mission language for shipped local capability.
* Tests proving real execution and recovery paths.

**Dependencies / Notes**:

* Depends on Session 01 for the all-access policy and Session 03 for shared Hermes access semantics.
* The bridge API decision is settled here: implement local token-gated route families for workspace, shell, git, process, and file/write execution, with visible success output and tested recovery paths.

**Acceptance Checks**:

* Workspace, shell, git, process, and file/write capabilities execute end to end wherever still exposed.
* Claude Code pages no longer render `ReadOnlyLabel` or describe local execution as read-only.
* Tests fail if Claude Code reverts to descriptive-only placeholders, mock-only success, or admin-disabled local defaults.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/prd/phase_41/session_10_claude_code_execution.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
